Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

前端 未结 16 2035
失恋的感觉
失恋的感觉 2020-12-08 13:32

When I run

Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber

it works for both local and remote hosts.

W

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 13:57

    I just came to the exact same issue and found the answer here: http://powershellcommunity.org/Forums/tabid/54/aft/7537/Default.aspx

    I had space characters at the end of each line the input file. If your file does too, just remove them and your script should work.

提交回复
热议问题