Custom Objects

Standard custom object:

 

Ordered custom object:

 

[PSCustomObject] casting is available in PowerShell v3 and up. For v2 use the below method to avoid creating a hashtable instead.

 

[ordered] is also only available in v3 and up. To order a PSCustomObject in v2 try this.