I have some PowerShell scripts that accept many long parameters, like,
myScript.ps1 -completePathToFile "C:\...\...\...\file.txt" -completePathForOutput "C:\...\...\...\output.log" -recipients ("[email protected]") -etc.
I can't seem to make PowerShell run such scripts unless all the parameters are on a single line. Is there a way to invoke the script more like this?
myScript.ps1
-completePathToFile "C:\...\...\...\file.txt"
-completePathForOutput "C:\...\...\...\output.log"
-recipients (
"[email protected]",
"[email protected]"
)
-etc
The lack of readability is driving me nuts, but the scripts really do need to be this parametric.