Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
powershell_script_arguments [2021/10/25 18:01] – mgupton | powershell_script_arguments [2021/11/01 11:58] (current) – mgupton | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Powershell Script Arguments ====== | + | ====== Powershell Script Arguments/ |
+ | * [[https:// | ||
* [[https:// | * [[https:// | ||
Line 11: | Line 12: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | === switch parameters === | ||
+ | |||
+ | <code powershell> | ||
+ | function Switch-Item { | ||
+ | param ([switch]$on) | ||
+ | if ($on) { " | ||
+ | else { " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === positional arguments === | ||
+ | |||
+ | <code powershell> | ||
+ | function Get-Extension { | ||
+ | $name = $args[0] + " | ||
+ | $name | ||
+ | } | ||
+ | </ | ||
+ |