Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:43
+ $PC = Read-Host "wmitche-lt";Get-WmiObject <<<< win32_desktop -ComputerName $PC -ErrorVariable wmierror;if ($wmierro
r -ne $null) {Write-Host "WMI error of " $wmierror};else {Write-Host "Was able to connect to PC " $PC}
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
WMI error of The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
The term 'else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:168
+ $PC = Read-Host "wmitche-lt";Get-WmiObject win32_desktop -ComputerName $PC -ErrorVariable wmierror;if ($wmierror -ne
$null) {Write-Host "WMI error of " $wmierror};else <<<< {Write-Host "Was able to connect to PC " $PC}
+ CategoryInfo : ObjectNotFound: (else:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException