Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created October 23, 2015 03:29
Show Gist options
  • Save lazywinadmin/3ec707526b1720a4e0f1 to your computer and use it in GitHub Desktop.
Save lazywinadmin/3ec707526b1720a4e0f1 to your computer and use it in GitHub Desktop.
User $PSBoundParameters to create a powershell object
function test {
param($first,$last)
New-Object PSObject -Property ([ordered]@{}+$PSBoundParameters)
}
test john doe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment