Khi tôi chạyGet-WmiObject: Máy chủ RPC không khả dụng. (Ngoại lệ từ HRESULT: 0x800706BA)
Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber
nó hoạt động cho cả host nội bộ và từ xa.
Khi tôi làm việc này cho một danh sách các máy chủ sử dụng
ForEach ($_ in gc u:\pub\list.txt) {
Get-WmiObject win32_SystemEnclosure -Computer $_ | select serialnumber | format-table -auto @{Label="Hostname"; Expression={$_}}, @{Label="Service Tag"; Expression={$_.serialnumber}}
}
nó trả
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Firewall trên máy tính từ xa trên? Hoặc sự cố bảo mật DCOM –