How do I find the properties available from a powershell command?
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
精彩评论