
When using PowerShell, Objects play a really important and fundamental role in how the system operates and interacts with data. They form the core of PowerShell’s ability to manage and manipulate information effectively. Then, moving beyond just understanding Objects, we also encounter the third key concept that is essential to grasp for working efficiently in PowerShell environments, Get-Member.
When using Get-Member, we often encounter hidden properties.
What does that mean?
When running a cmdlet in PowerShell, we typically see only the information Microsoft intends for us to view initially.
Here’s an example:

I ran Get-ChildItem on my Code folder.
The output is an object featuring properties like Mode, LastWriteTime, Length, and Name.
However, this object contains many more properties beyond these.
To discover all the properties, pipe the cmdlet to Get-Member as follows:
Get-ChildItem -Path C:\Code | Get-Member
Then I will get two lists of information about two different types of objects.
This is because I have both files and folders in my C:\Code folder.
System.IO.DirectoryInfo and System.IO.FileInfo
And we will see both methods and different properties.
To only see the properties we can do like this:
Get-ChildItem -Path C:\Code | Get-Member -MemberType Properties
The same thing happens for almost all cmdlets.
If we do the same thing with Get-Service.
Get-Service
Then we only see Status, Name and DisplayName.
But if we use Get-Member again we can se more properties for Get-Service.
Get-Service | Get-Member -MemberType Properties

The last two errors are normal; some services cannot be accessed.
This section of the summer tips series demonstrates in detail how to find and explore object properties using the Get-Member cmdlet. In upcoming parts of the series, I will also explain how to display additional properties beyond the default set that are initially shown. This will help you gain a deeper understanding of object properties and how to customize the output according to your needs.
Leave a Reply