top of page

PowerShell -Property

A perfect example is the one below. In Fig.(A) when you do a simple PowerShell query to get information on a service it only returns 3 details on the service. In Fig.(B) I had to change it up a bit to get all the information to display on available properties. Then in Fig.(C) I use PowerShell pipe | and select to get the value for the startup type property which is set to automatic.

Ext-Service-Short.png
Ext-Service.png
Ext-1.png

When I query PowerShell with Active Directory Module with Get-ADUser a short default list of data is returned. Append the -properties with a wildcard * syntax to gather output not shown in the default list.

As you see there is a difference on where the -properties * is placed and also a difference on the data returned. In the above PowerShell query for services you get the list of the properties that you can call on. In the example below where –properties comes right inline and before the pipe | you actually get the values for each property as well as the property name. If you try the -properties * with the Get-Service as shown in Fig.(D) it doesn't work.

Ext-2.png
get-aduser.png
bottom of page