Executing PowerShell script
Check your execution policy: PS> Get-ExecutionPolicy The execution policy is "Restricted" by default Change it to "Unrestricted" PS> Set-ExecutionPolicy Unrestricted Then you can run your script e.g. PS> .\scriptfile.ps1 Ref: http://ithelp.ithome.com.tw/question/10028377