
How it works…
This recipe is only here to show you that PowerShell outputs objects, and what an object looks like. We will look at leveraging the TypeName much later, when we modify the returned objects.
For now, we will stick to properties as the first step for understanding the object model of PowerShell. To demonstrate that methods are also available for use, we will use one that's among the simplest of them, the ToString() method; it's simple because it does not need any arguments—only empty parentheses.
The Get-Member cmdlet is very important in PowerShell because it lets you peek into the object that a certain cmdlet returned. It shows the type of the object returned (TypeName), and shows the properties and methods available. The properties and methods are of different data types themselves, which can be seen in the Definition column. As you get comfortable with objects, you will start to leverage these data types to simplify your tasks.