In Order to understand Get-Member we need to understand the what is command output.
When you run the Get-Process command
Each of the rows is Object of type System.Diagnostics.Process (the yellow ones)
The Red ones are Properties / AliasProperty
PowerShell is OOP Program all the command return object and if you want to know what type you pipe it to Get-Memeber
Get-Process | gm (GM is Alias of Get-Memeber command)
you can see in the typename: the .Net Object (C# Object) and you can go to MSDN site to read about this object
An object can have Properties like Name Description Id etc... depend on the Object
Can Have Event like Process Disposed, ErrorDataReceived etc...
Can Have Method like Close, Kill, CloseMainWindow etc...
In Powershell, it can also have AliasProperites and Script Properties, CodeProperty
We need to know the name of the Properties in order to use it in our script.
Also when you run the gm with -force you can get a PSObject, special object in PowerShell, we will talk about him in a later article.
Let's see if you understand...
How can we get the status of the service 'Print Spooler'
You need to get this on your screen