user105135
user105135

Reputation:

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. 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.

Upvotes: 2

Views: 5607

Answers (1)

manojlds
manojlds

Reputation: 301437

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

Upvotes: 8

Related Questions