我正试图通过wmi和powershell远程处理来监视windows机器。我通过非管理用户帐户成功地启动了该机器的远程会话,但现在我在运行WMI查询时遇到了问题。我的用户属于以下组(我跟踪这个答案为该用户设置帐户):
[192.168.173.206]: PS C:\Users\lpu\Documents> Get-ADPrincipalGroupMembership $env:username | Format-table name
name
----
Domain Users
Performance Monitor Users
Distributed COM Users
Remote Management Users
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
[192.168.173.206]: PS C:\Users\lpu\Documents> os_caption
Get-WmiObject : Access denied
At line:2 char:6
+ (Get-WmiObject -class Win32_OperatingSystem).Caption
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
发布于 2014-04-14 13:42:41
正如我的学院告诉我的,我需要关闭用户帐户控制。
您可以使用以下命令执行此操作,我是从这个答案获得的:
New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 0 -Force
Restart-Computer
https://serverfault.com/questions/588817
复制相似问题