Get-Process ? newbie question

Hi

I am brand new to this and is learning the command Get-Process | ft name, cpu, starttime, Company,

If i run a “get-process” I get the headlines Status Name DisplayName

nothing else

It is however possible to run

Get-Process | ft name, cpu, starttime, Company, path -wrap -GroupBy Company

and I see the headlines mentioned in the command (name, cpu, starttime etc)

How am i supposed to know, that Get-Process contains the possibility of showing the added headlines?

I would expect a command like “Get-Process -detail” but i cannot find a command like that.

I hope im not to unclear.

/Vejling

 

When you pipe to Format-Table (ft), you’re piping all properties and telling Format-Table you only want to see select properties. Be with Format-Table, it is ONLY made to display formatted for the shell. No data is passed beyond most Format-* commands, so you cannot do Get-Process | Format-Table | Stop-Process, one of Powershell’s Gotchas (see the ebook in the Free Resources). Here is a basic answer to your question:

#Some commands have a lot of information, so they show default properties
#In this case, even the column names are aliases to try to fit the most needed
#information on the screen in a table format
Get-Process

#The first thing you can try is simply using Select-Object to override the formatting
#and showing all properties
Get-Process | Select-Object -Property * 

#To show all properties\methods\etc. for a command, use Get-Member 
Get-Process | Get-Member -Force

#Another note is commands like Get-ADUser.  There is a -Properties parameter.  By default, it only
#shows a couple of attributes.  You need to specify * for all properties and anytime you want another property
#outside of the defaults, for instance if you wanted default properties and mail, it would be -Property Mail. If
#you see a Property parameter, the command gives you the ability to manipulate what is returned as there is an impact to
#performance and time the more you pull.  Get-Process is simply hiding properties to make it simple and easy to read.
Get-ADUser -Property Mail | Select * # would show defaults + mail
Get-ADUser -Property * | Select * #would show ALL properties in Active Directory for users

Thank you very much Rob.

Imagine all people being that helpful. I hope I will be able to pass on the kindness sometime.

 

Best regards

/Vejling