Hi again guys,
I’m playing around with Get-Counter, but I’ve got really odd issue. If I try to run Get-Counter -ComputerName XXX to a Windows 7 client, i get
Get-Counter : Unable to connect to the specified computer or the computer is offline. At line:1 char:1 + Get-Counter -ComputerName 'MY-WIN7-CLIENT -Counter "\Memory\Available M ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (:) [Get-Counter], Exception + FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand
The command I’m using is Get-Counter -ComputerName ‘MY-WIN7-CIENT’ -Counter “\Memory\Available MBytes” -Continuous | Out-GridView.
- I've made sure the machine is online & DNS resolves
- I've tried it from Windows Server 2012 R2 and from another Windows 7 client
- I can Enter-PSSession and run the command locally
- I can actually connect via the perfmon gui
- I have disabled firewalls on both my server and client to test
- I've upgraded the Windows 7 clients to WMF 4/Powershell 4.0
- I've tried using different counters and also removing -ComputerName parameter and directly entering it into -Counter "\\MY-WIN7-CLIENT\..."
- I've tried multiple Windows 7 clients and Server 2012 R2 servers
- If I run the command on the Windows 7 client including the -ComputerName and use the computer's name, it still fails (Although, it seems a lot of people get this issue)
- I can successfully run the command from Server 2012 R2 to Server 2012 R2
- I can successfully run the command from Windows 7 to Server 2012 R2
- It fails if I run the command from Server 2012 R2 or Windows 7 to Windows 7
Anyone had any joy with this? Is this just a limitation of Windows 7?