Hello everyone,
I am trying to run a PowerShell script that displays Windows Services on a Remote Computer using the correct security credentials however, I am being presented with the Error Response below; does anyone know why this is happening?, thank you in advance …
PowerShell Code
$cred = get-Credential -credential domain\user_name
$computer = “Remote_Hostname”
Get-WMIObject Win32_Service -computerName $computer -credential $cred
Error Response
Get-WMIObject : Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED))
At line:3 char:1
- Get-WMIObject Win32_Service -computerName $computer -credential $cred
-
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand