Skip to content

Instantly share code, notes, and snippets.

@scriptingstudio
Last active April 30, 2023 10:17
Show Gist options
  • Save scriptingstudio/90c71bfef4aecf3cccc008e990aa5d7b to your computer and use it in GitHub Desktop.
Save scriptingstudio/90c71bfef4aecf3cccc008e990aa5d7b to your computer and use it in GitHub Desktop.
A simple way to create empty PSCustomObject with properties
[PSCustomObject]@{} | select-object q,w,e,r | gm
TypeName: Selected.System.Management.Automation.PSCustomObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
e NoteProperty object e=null
q NoteProperty object q=null
r NoteProperty object r=null
w NoteProperty object w=null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment