Get-WMIObject blocked.
- December 19th, 2018
- Write comment
Remote server: Windows 2016
I had some issues using Get-WmiObject to work on a remote server in Powershell. I kept getting: “The RPC server is unavailable.” I verified that the “Windows Management Instrumentation” service was running.
It turns out it was the firewall blocking the request.
I used the following to open up ports for the program to access the server information:
C:>netsh advfirewall firewall set rule group=”Windows Management Instrumentation (WMI)” new enable=yes