I’ve got a param block param([switch]$csv, [switch]$recurse) and I want to hardcode the values in the script rather than pass them from the command line. Is it as simple as replacing the param block with
$csv="hardcoded value"
$recurse="another hardcoded value"
or is there something else I need to watch out for?
If you are never going to need to declare them in the command line, then you should simply hardcore them in the code and not put them in as params. Otherwise as C.B. said, you can declare they have a default value and override it by declaring it.