I've got the following param block at the start of a script
param(
[string]$command,
[string]$version = "1.1.0"
)
This is fine, only I need $version to not be a positional parameter, so that if you type
.\script.ps1 run argument
Then $args should contain "argument" and $version should be "1.1.0". I know I can do it with a C# Cmdlet, but it would be more convenient if I could deliver this as a single script.