Skip to content

Instantly share code, notes, and snippets.

@wgross
Created June 24, 2015 10:06
Show Gist options
  • Save wgross/4f3f2bdb8f5b9c35668d to your computer and use it in GitHub Desktop.
Save wgross/4f3f2bdb8f5b9c35668d to your computer and use it in GitHub Desktop.
Creates a piece of powershell code wrapping a call to an exsisting cmdlet. The original cmdlets parameters are provided by the proxy cmdlet based on the metedata of the existing cmdlet.
param(
$CommandName
)
[System.Management.Automation.ProxyCommand]::Create(
(New-Object System.Management.Automation.CommandMetaData (Get-Command $CommandName)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment