Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell:尝试使用get-WMIOObject返回服务状态_Powershell_Powershell Remoting - Fatal编程技术网

Powershell:尝试使用get-WMIOObject返回服务状态

Powershell:尝试使用get-WMIOObject返回服务状态,powershell,powershell-remoting,Powershell,Powershell Remoting,尝试使用以下内容查询Windows 2012服务器上的服务时,我收到拒绝访问错误: get-wmiobject -Class Win32_Service -comp 192.168.60.23 -cred lab\test -filter "name='tapisrv'" 如果我使用一个域管理员帐户作为-cred参数,那么当然一切正常。然而,使用测试帐户,我似乎无法使它工作。以下是我迄今为止尝试过的一些事情: 已将测试帐户添加到WinRMRemoteWMIUsers_uuu和分布式COM用

尝试使用以下内容查询Windows 2012服务器上的服务时,我收到拒绝访问错误:

 get-wmiobject -Class Win32_Service -comp 192.168.60.23 -cred lab\test -filter "name='tapisrv'"
如果我使用一个域管理员帐户作为-cred参数,那么当然一切正常。然而,使用测试帐户,我似乎无法使它工作。以下是我迄今为止尝试过的一些事情:

  • 已将测试帐户添加到WinRMRemoteWMIUsers_uuu和分布式COM用户组
  • 已确保在dcomcnfg->Component Services->My Computer->properties->COM Security->Launch and Activate Permissions中添加分布式COM组
  • 将测试帐户添加到WMIMGMT.msc->WMI控件->属性->安全->根->安全
大多数故障排除步骤都来自这里:

我能让测试用户工作的唯一方法是让他成为本地管理员,这是我不想做的。是否有任何配置我忽略了,以使这项工作


谢谢

好的,所以它很模糊,我在下面的帖子中找到了它:

sc sdset SCD经理:(A;;CCLCRPRC;;;AU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)


我感谢那些试图帮助我的人

由于您的问题与PowerShell无关,但与安全相关,我认为这在SuperUser上可能会更好。有办法解决它吗?我很乐意把它放在一个更合适的地方。