I have a powershell script where I want to be able to bring up a help
screen. So far it accepts 3 parameters directoryURL
loginprefix
and validateOnly
.
param(
[Parameter(Mandatory=$true)]
[string]$directoryUrl,
#[Parameter(Mandatory=$true)]
[string]$prependedPermissions,
#[Parameter(Mandatory=$true)]
[string]$validateOnly
);
What I want to check if someone types -help
in the argument anywhere such as .\scriptName.ps1 -help
it will be able to appear on the screen.
How can I do that?