开发者

How do I find the properties available from a powershell command?

开发者 https://www.devze.com 2023-03-28 07:47 出处:网络
I want t开发者_JAVA百科o find what the possible columns or elements are from the get-service command. I am mostly interested in finding the log on as value a service runs under, but it\'d be nice to k

I want t开发者_JAVA百科o find what the possible columns or elements are from the get-service command. 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-Service | gm

Coming to Log On As, I think Get-Service ( or rather the [ServiceController] type) does not expose it. You can use WMI though:

gwmi win32_service | select name, startname
0

精彩评论

暂无评论...
验证码 换一张
取 消