Is it possible to call a PowerShell script with options? Like a parameter without a value.
For instance I currently use:
param (
$lastmonth=0
);
in the script. Now I can use the call
script.ps1 -lastmonth 1
or
script.ps1
and use $lastmonth for controlling the flow.
But I'd like to have the calls like
script.ps1 -lastmonth
and
script.ps1
and control the flow depending on whether -lastmonth was given, or not.