July 2017
Intermediate to advanced
648 pages
31h 9m
English
Since the default execution policy is configured to RemoteSigned, the effect is that all remote (UNC) or downloaded scripts required to be digitally signed.
It is very common that when a script is downloaded, we need to unblock this file before it can be executed when the policy is set to default settings.
Of course, the recommendation before unblocking any downloaded file is to test it in a test environment so it doesn't harm any production environment or it doesn't contain any malicious code in some way:
Unblock-File -Path C:\Scripts\HarmlessScript.ps1
Get-ChildItem C:\DownloadFolder | Unblock-File
The first line unblocks the specified downloaded file, while the second line retrieves all files from a folder called DownloadFolder ...
Read now
Unlock full access