The #Requires
is a statement that prevents the script or module to run if the prerequisites defined with the requirement isn’t met. The statement can appear on any line in a script but must be the first item on a line. A script can include more than one #Requires
statement.
To find out which parameters can be used, type
Get-Help about_requires
in the Windows PowerShell Console.