How to find properties of an object?
How can I find what properties object $a has in the following?
$a = 1
$a | Get-Member
Get-Member does not seem to produce any properties for object $a? Is length a property of object $a?
$a is an Integer, it doesn’t have a length property. Using Get-member is the right way to find object properties.
You can also pipe a sample object to Select-Object to see all properties and their values.
get-process | select -first 1 -prop *
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News