

Like all scripting/programming languages, Powershell supports a number of data types and variables. We have previously stated that PowerShell actually provides direct support for the .NET framework, and that we can use all the features in the .NET environment within PowerShell. When viewed from this perspective, PowerShell supports all data types supported by .NET. Let's take a look at the types of data we will use a lot in our daily lives:

You can see in the list that the PSCustomObject data type, which is specially designed for PowerShell, while other data types are data types we are familiar with from programming and scripting languages and databases. This data type allows users to create customized objects. A PSCustomObject is an object that has one or more properties of different types.
Used with @{} (Hashtable) to create a PSCustomObject.
$myObject = [PSCustomObject]@{ FirstName = 'Lets' LastName = 'Defend' Rank = 1 }
In this example, we created a PSCustomObject with three properties named FirstName , LastName , and Rank . These properties can be of different data types, for example, FirstName and LastName are strings (since we assign values in quotes), and Rank is an integer (since we are assigning a numerical value without using quotes).
Once we create this object, we can access it as follows:
$myObject.FirstName $myObject.LastName $myObject.Rank