Wrapper function for cmdlet - pass remaining parameters
问题 I'm writing a function that wraps a cmdlet using ValueFromRemainingArguments (as discussed here). The following simple code demonstrates the problem: works function Test-WrapperArgs { Set-Location @args } Test-WrapperArgs -Path C:\ does not work function Test-WrapperUnbound { Param( [Parameter(ValueFromRemainingArguments)] $UnboundArgs ) Set-Location @UnboundArgs } Test-WrapperUnbound -Path C:\ Set-Location: F:\cygwin\home\thorsten\.config\powershell\test.ps1:69 Line | 69 | Set-Location