Skip to content

Latest commit

 

History

History
 
 

Dynamic-switch-parameter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Dynamic switches specified before positional parameter arguments with omitted parameter names swallow these arguments and make a command invalid, either due to incorrect syntax or shifted arguments. In the latter case a command may even work without errors with incorrect input parameters.

Workarounds

  • Specify dynamic switches with values -ReadOnly:$true.
  • Or specify dynamic switches after positional parameters.
  • Or do not omit parameter names of positional parameters.

Scripts