RSS

Getting security warnings from PS scripts

15 Apr

One of the pesky problem of trying to run Powershell scripts downloaded from the internet, like from GitHub, is that you always get security warning whether you set execution policy as unrestricted or bypass. This is especially true in security strict companies like a financial institution.

The main reason for this is ADS [Alternate Data Streams]. The fix is to unblock the files

Get-ChildItem -Filter *.ps1 | Unblock-File

This is explained here:
https://4sysops.com/archives/powershell-bypass-executionpolicy-to-run-downloaded-scripts/

 
Leave a comment

Posted by on April 15, 2018 in powershell

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.