[英]How do I find the properties available from a powershell command?
I want to find what the possible columns or elements are from the get-service command.我想从 get-service 命令中找到可能的列或元素。 I am mostly interested in finding the log on as value a service runs under, but it'd be nice to know how to find others when the need arises.我最感兴趣的是将登录作为服务运行的价值,但是在需要时知道如何找到其他人会很好。
Use the Get-Member
cmdlet - gm
in short使用Get-Member
cmdlet - 简称gm
Get-Service | gm
Coming to Log On As
, I think Get-Service
( or rather the [ServiceController]
type) does not expose it.来到Log On As
,我认为Get-Service
(或者更确切地说[ServiceController]
类型)不会公开它。 You can use WMI though:您可以使用 WMI:
gwmi win32_service | select name, startname
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.