#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 do...