I created this basic test powershell component monitor that fails with the following error message when I run it
Get-Counter : Unable to access the desired computer or service. Check the permissions and authentication of the log service or the interactive user session against those on the computer or service being monitored.
# This gets a Windows performance counter from the specified IP
$counter = Get-Counter "\\${IP}\LogicalDisk(C:)\free megabytes"
$size = $counter.CounterSamples.CookedValue / 1000 # Size to GB
Write-Output "Statistic.Drive:0"
Write-Output "Message.Drive:$size"
The credentials used to run the monitor have domain admin privileges and are the same for every other component monitor and system poller.
These same credentials are local admin access to the SAM.
The line above is successful if I test run the component monitor against the SAM server (so ${IP} is the localhost)
WMI is allowed through the Windows Firewall on each server and they are all on the same VLAN
The strange thing however, is that the line works if I log into the SAM server with the same SAM service account, fire up a PowerShell console and run the Get-Counter command to query a server other than localhost
$someRemoteServer = "1.2.3.4"
Get-Counter "\\$someRemoteServer\logicaldisk(c:)\free megabytes"
If the SAM server itself can directly query other server's performance counters, what is preventing the Windows PowerShell Component Monitor using the same credentials?
Any help would be great.