Skip to content

Instantly share code, notes, and snippets.

@brettmillerb
Last active February 8, 2018 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettmillerb/73cac0f6f4068f6feb81446d819a6efe to your computer and use it in GitHub Desktop.
Save brettmillerb/73cac0f6f4068f6feb81446d819a6efe to your computer and use it in GitHub Desktop.
VSCode Snippets
"Select-Expression": {
"prefix": "Select-Expression",
"body": [
"Select-Object @{name='${PropertyName}';expression={{\\$_.${Property}}}"
],
"description": "Creates a PSCustomObject"
},
"PSCustomObject": {
"prefix": "PSCustomObject",
"body": [
"[pscustomobject]@{\r",
"\t${item1} = '${Property1}'\r",
"\t${item2} = '${Property2}'\r",
"\t${item3} = '${Property3}'\r",
"\t${item4} = '${Property4}'\r",
"}"
],
"description": "Creates a PSCustomObject"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment