Wednesday, May 22, 2013

Executing PowerShell script

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

No comments:

Post a Comment

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...