Export-VM -WAIT not working

Aug 26, 2014 at 9:16 AM
Edited Aug 26, 2014 at 9:16 AM
When I use the -WAIT $TRUE Switch to Export am VM I get the following error:

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At C:\program Files\modules\hyperV\VM.ps1:73 char:26
  • Get-WmiObject <<<< -computername $Server -NameSpace $HyperVNamespace -Query $WQL | Add-Member -MemberType ALIASPROPERTY -Name "VMElementName" -Value "ElementName" -PassThru
    • CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
    • FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Any ideas? Powershell is running as Administrator!
Oct 2, 2014 at 6:12 PM
Hi Wolfgangbures,

The -WAIT is a switch, so with it on the command line, if it is there means set to TRUE, if it is not on the command line it will be FALSE. Since you are trying to set it to TRUE, just leave off the $TRUE.