Summary: Create a custom Windows PowerShell object with the PSCustomObject type accelerator.
What’s the easiest way to create a custom object?
Charlotte Windows PowerShell User group member Brian Wilhite says: One of the easiest ways to create a custom object is to use the PSCustomObject type accelerator. This “shortcut” will not only create the custom object, but it will arrange the key/value pairs in the order in which they were entered.
$CustomObject = [PSCustomObject]@{a=1;c=3;b=2;d=4}
$CustomObject | Get-Member