Skip to content

Commit

Permalink
Allow passing through of unbound positional parameters as-is
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGough committed Dec 20, 2024
1 parent 03fd209 commit 183f4de
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,11 @@ function Measure-ADTCompatibility
# This is a splatted parameter, e.g. @params, retain the original value
$NewParam = $boundParameter.Value.Value.Extent.Text
}
elseif ($boundParameter.Key -match '^\d+$')
{
# This is an unrecognized positional parameter, pass through as-is
$newParam = $boundParameter.Value.Value.Extent.Text
}
else
{
# This is a regular parameter, e.g. -Path 'xxx'
Expand Down

0 comments on commit 183f4de

Please sign in to comment.