Author Posts

January 2, 2015 at 2:11 am

Hi

when I following tutorials i face this issue

[u][b]Method 1[/b][/u]

when i run[b] Get-WmiObject -Class win32_bios -ComputerName lon-svr1[/b] It gives me a error that RPC server is unavailable

then i try as follows

[u][b]Method 2[/b][/u]

[b]Enter-PSSession -ComputerName lon-svr1[/b]

[b]Get-WmiObject -Class win32_bios -ComputerName lon-svr1[/b]

when i run as the second method it works what would be the error

Thanks

Kasun Rajapakse

January 2, 2015 at 2:21 am

In your first example you are trying to connect to WMI remotely and in the second you are connecting to WMI on the system itself. Get-WmiObject uses DCOM to connect to remote systems. The error message suggests that that connection can't be made. Check to see if there is a firewall blocking DCOM and/or WMI traffic. By default the Windows firewall doesn't allow WMI related traffic.

Alternatively use

Get-CimInstance -ClassName win32_bios -ComputerName lon-svr1

The CIM cmdlets work over WSMAN – the same as PowerShell remoting – and as you can create a remoting session to the system you should be able to use Get-CimInstance

I would recommend the CIM cmdlets over the WMI cmdlets in nearly all cases

January 2, 2015 at 3:39 am

Hi

Thanks for the reply appreciate it 🙂