【发布时间】:2018-08-14 16:49:42
【问题描述】:
我正在努力弄清楚发生了什么,但它对我正在使用的系统产生了相当广泛的影响。
我有几台机器在运行一项服务,但是当我尝试查询该服务(在 .net 和 powershell 中)时,找不到该服务。当我通过 RDP 连接到机器时,服务就会出现。我已经确认我拥有该服务的权限,包括使用 subinacl 为我的用户授予该服务的显式权限。
我确实从 get-service -computername $server 返回了一个结果,但它没有列出我正在寻找的服务。我在这里缺少组策略或 Windows 配置吗?为什么有些服务会远程显示而不是全部显示?
任何关于寻找什么的提示/建议将不胜感激。
编辑:使用此命令:
get-Service -computername $servername | Export-Csv C:\temp\Local.csv -notypeinformation
在机器上产生以下文件: https://drive.google.com/open?id=1aXvIgWT4NU2EN4j14JlxrY-jHGp-hG2Q
对机器远程运行相同的命令会产生以下文件: https://drive.google.com/open?id=16NvRgrQsSGc9CKlqmIqntLy1bkLMl5tJ
EDIT2:
命令:
Get-Service -Computername $servername -Name 'AdobeARMservice'
远程运行结果:
Get-Service : Cannot find any service with service name
'AdobeARMservice'. At line:1 char:1
+ Get-Service -Computername $servername -Name 'AdobeARMservice'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (AdobeARMservice:String) [Get-Service], ServiceCommandExcep
+ FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand
本地运行结果:
Status Name DisplayName
------ ---- -----------
Running AdobeARMservice Adobe Acrobat Update Service
编辑3:
这个问题也可以在微软服务列表中看到。
【问题讨论】:
-
您需要提供示例命令和输出(没有人可以看到您的屏幕)。
-
使用此命令:"get-Service -computername $servername | Export-Csv C:\temp\Local.csv -notypeinformation" 在机器上产生以下文件drive.google.com/open?id=1aXvIgWT4NU2EN4j14JlxrY-jHGp-hG2Q 远程运行相同的命令对机器产生以下文件:drive.google.com/open?id=16NvRgrQsSGc9CKlqmIqntLy1bkLMl5tJ
-
我无法访问这些链接。请使用只包含重现问题所需的最少代码量的简短示例脚本来更新您的问题。同时发布您收到的确切错误消息(如果有)的文本(不是图片)。
-
我认为问题在于阻止远程查看特定服务的组策略。一些服务出现,而另一些则没有。我已经使用 AdobeARMService 的示例更新了我的 OP(参见编辑 2)
-
我会检查相关服务的权限。这似乎是一个超级用户/服务器故障问题,而不是一个 stackoverflow 问题。
标签: windows powershell networking service