Setting up environment for PowerShell scripting
The first step that every PS scripter should do is to set ExecutionPolicy appropriately. If you work at the developer level, where you have to run various scripts/code from other sources and can validated the script actions only then setup it to Unrestricted. Otherwise RemoteSigned is the recommended value. Setting up PS ExecutionPolicy to to Unrestricted: You need to run this cmdlet as admin user: PS C:> Set-ExecutionPolicy Unrestricted PS C:> Get-ExecutionPolicy Unrestricted PS C:> Otherwise PS will err at you as shown below: PS C:> Set-ExecutionPolicy Unrestricted Execution Policy Change The execution policy helps protect you from […]
Read more