Skip to content

Commit

Permalink
Fixed typo in help
Browse files Browse the repository at this point in the history
Note: $PSBoundParameters and corresponding variables in the Begin
section are not available if the function arguments were passed via
pipeline. So if one ever happen to implement support for the
ValueFromPipeline attribute, the code that recreates variables from the
bound parameters in examples will need to be moved to the Process block.
  • Loading branch information
beatcracker committed May 19, 2015
1 parent 18cc70c commit 656511b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion New-DynamicParam.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
#If no corresponding variable exists, one is created
#Get common parameters, pick out bound parameters not in that set
Function _temp { [cmdletbinding()] param() }
$BoundLeys = $PSBoundParameters.keys | Where-Object { (get-command _temp | select -ExpandProperty parameters).Keys -notcontains $_}
$BoundKeys = $PSBoundParameters.keys | Where-Object { (get-command _temp | select -ExpandProperty parameters).Keys -notcontains $_}
foreach($param in $BoundKeys)
{
if (-not ( Get-Variable -name $param -scope 0 -ErrorAction SilentlyContinue ) )
Expand Down

0 comments on commit 656511b

Please sign in to comment.