From a workgroup machine, I run the following command:
$wmi_pass = "<password>"
$wmi_user = "<username>"
$remote_pass = ConvertTo-SecureString -String $wmi_pass -AsPlainText -Force;
$remote_credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $wmi_user, $remote_pass;
Get-WMIObject -Query "Select DisplayName from Win32_Service where StartMode='Auto'" -ComputerName "<IP address>" -Credential $remote_credential
I get the following error: Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)
I've tried it on several servers with the same results. Using the wmimgmt.msc, I selected the Root node and verified that Administrators group has all "Allow" checkboxes selected (except Special Permission).
Any thoughts?