Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для Ingolder

Старожил


Сообщения: 318
Благодарности: 9

Профиль | Отправить PM | Цитировать


deepred, , пробовал так и сяк:

Код: Выделить весь код
PS C:\Users\Admin> Get-WmiObject -Query "Select * from Win32_Service where name = 'Themes'" -ComputerName 192.168.1.102
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:14
+ Get-WmiObject <<<<  -Query "Select * from Win32_Service where name = 'Themes'" -ComputerName 192.168.1.102
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

PS C:\Users\Admin> $Computer = "192.168.1.102"
PS C:\Users\Admin> $serviceName = "Themes"
PS C:\Users\Admin> $query = "Select * from Win32_Service where name = '$serviceName'"
PS C:\Users\Admin> $rtn = Get-WmiObject -Query $query -ComputerName $computer
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:21
+ $rtn = Get-WmiObject <<<<  -Query $query -ComputerName $computer
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Отправлено: 00:30, 29-08-2010 | #3