when I following tutorials i face this issue
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
[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
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.
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
Thanks for the reply appreciate it 🙂
You must be logged in to reply to this topic.