Enforce minimum version of powershell host

suggest change
#requires -version 4

After trying to run this script in lower version, you will see this error message

.\script.ps1 : The script ‘script.ps1’ cannot be run because it contained a “#requires” statement at line 1 for Windows PowerShell version 5.0. The version required by the script does not match the currently running version of Windows PowerShell version 2.0.

Feedback about page:

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



Table Of Contents