Search notes:

System.Management.Automation.PSCustomObject

Creating a PSCustomObject in PowerShell

In PowerShell, an object whose type is System.Management.Automation.PSCustomObject can be created like so:
PS C:\> $obj = new-object psObject
PS C:\> $obj.GetType().FullName
System.Management.Automation.PSCustomObject

Adding properties (named values) to a PSCustomObject object

As all PowerShell objects, a PSCustomObject can be added properties, which are basically named values. This functionality is probably the main use for PSCustomObjects.
$psCustObj = new-object psObject
$psCustObj | add-member num  42
$psCustObj | add-member txt 'hello world'

write-host "num = $($psCustObj.num), txt = $($psCustObj.txt)"

'num', 'txt' | foreach-object { write-host "$_ : $($psCustObj.$_ )" }

Definition and significance of PSCustomObject

In the source code, PSCustomObject is defined like so (redacted by me for brevity):
public class PSCustomObject
{
    /// To prevent other instances than SelfInstance.
    private PSCustomObject() { }

    internal static PSCustomObject SelfInstance = new PSCustomObject();

    public override string ToString()
    {
        return string.Empty;
    }
}
So, PSCustomObject directly derives from System.Object, does not implement any interface and does not have any fields or properties except the internal field SelfInstance.
A PSCustomObject is used to initialize a PSObject if the PSObject does not refer to any other .NET class (and thus essentially becomes a custom-object). See PSObject, its base object and PSCustomObject.

See also

System.Management.Automation.PSObject

Index