While Executing: Get-VM
If one of the VM names in the -VM parameter contains the characters "[" or "]" the nested command (in the VM.ps1 script) ...
Get-WmiObject -computername $Server -NameSpace $HyperVNamespace -Query $WQL | Add-Member -MemberType ALIASPROPERTY -Name "VMElementName" -Value "ElementName" -PassThru
...returns a NULL value.
As a quick fix, I just added the following (right after the existing $Name = $Name.Replace("*","%")
$Name = $Name.Replace("[","%")
$Name = $Name.Replace("]","%")
I didn't want to have to ask the end user to change the name of their VMs, so I thought this would be the best way to handle this "issue" (I am not even sure it is an issue).