A thread for your recently acquired valuable snippets of IT related knowledge.
Today I've learned that Windoze PowerShell* scripts/functions can handle switches as well as parameters.
Param(
[switch]$R
)
if($R) {
write-host "I need to re-write this to do something when -R is specified"
}
PS C:\Users\$myUser> D:\code\Common\Powershell\myScript.ps1 -R
I need to re-write this to do something when -R is specified
PS C:\Users\$myUser>
*necessary evil