Skip to content

Latest commit

 

History

History

Dynamic-switch-parameter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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