- Powershell Core 6.2 Cookbook
- Jan Hendrik Peters
- 80字
- 2021-06-24 15:14:34
How it works...
In this recipe, you used custom objects with the PSCustomObject data type by using both the type-casting operator [PSCustomObject] as well as the New-Object cmdlet to create a new instance.
In the steps that followed, you saw how easy these objects are to work with. Custom objects can be very useful, especially in a pipeline. In the last two steps, you even injected a .NET type name into your own object as well as a .NET object.