Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.06 KB

File metadata and controls

26 lines (18 loc) · 1.06 KB

Dynamic switch parameter

Dynamic switches specified before positional parameters with omitted names affect positional arguments and make commands invalid, either due to incorrect syntax or shifted arguments. Note, commands may even work without errors with incorrectly treated parameters.

Workarounds

  • Specify dynamic switches after positional parameters.
  • Do not omit parameter names of positional parameters.

Used to work as a workaround, not working anymore in the latest v5.1+

  • Specify dynamic switches with values -ReadOnly:$true.

Scripts