PowerShell
ski tracks on a snowy landscape
PowerShellQ. How can I make a PowerShell script or function have mandatory parameters?Q. How can I make a PowerShell script or function have mandatory parameters?
There are a couple of ways to have mandatory parameters. The best way is to use the [CmdletBinding()] parameter syntax, as described in PowerShell's about_functions_advanced_parameters Help topic.
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.