Enforcing script prerequisites

suggest change

Versions

[{“Name”:“2.0”,“GroupName”:null},{“Name”:“3.0”,“GroupName”:null},{“Name”:“4.0”,“GroupName”:null},{“Name”:“5.0”,“GroupName”:null}]

Syntax

Remarks

A #requires statement can be placed on any line in a script, but it must be the first statement on that line.

A script can contain more than one #requires statement.

See about_Requires. -RunAsAdministrator was added in Windows PowerShell 4.0 and applies to Windows. -Modules was added in Windows PowerShell 3.0.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents