PowerShell's execution policy is a safety feature that controls the conditions under which PowerShell loads configuration files and runs scripts. Set-ExecutionPolicy (Microsoft.PowerShell.Security) - PowerShell What I am going to do is open the PowerShell ISE by clicking on the lower-hand side of the screen, and I am going to type powershell. "When you upgrade from a previous version of Exchange 2010 to Exchange 2010 SP2 and you've previously defined the execution policy of Windows PowerShell scripts using group policies, Setup will fail. But the smarter way is to use a Group Policy object. Typical PowerShell output with unnecessary and inconsequential error If a GPO sets the execution policy, the command line is not allowed to change that setting. Open the setting in the right window pane, open the Turn on Script Execution setting. You can actually change the MachinePolcy Execution Policy without going through GPO! Restricted. Right click on it, click New, On the New GPO pop up box provide new GPO a name. Configuring PowerShell Script Execution Policy - Windows OS Hub You can use GPOs not only to run classic batch files on a domain computers (.bat, .cmd, .vbs), but also to execute PowerShell scripts (.ps1) during Startup/Shutdown/Logon/Logoff. In our example, the new GPO was named: MY-GPO. This will start a new session of PowerShell with execution policy set to bypass. Right-click "Turn on script execution", then select "Edit". GPO Powershell Execution Policy If they are downloaded from the internet, you may need to execute unblock-file on them before running them. Powershell execution policy setting is overridden by a policy defined at a more specific scope. Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows . In the GPO editor, select Computer Configuration > Policies > Administrative Templates > Windows Components > Windows PowerShell. Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy . Open the setting in the right window pane, open the Turn on Script Execution setting. Double-click a setting called " Turn on Script Execution " on the right pane. The Update-Help cmdlet downloads and installs the newest help files for PowerShell modules and installs them on the computer. No warnings, no prompts. PowerShell Execution Policy Explained Example 2: Set an execution policy that conflicts with a Group Policy To do this, run the Local Group Policy Editor (gpedit.msc) and enable the Turn on Script Execution policy in the section Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell. This is the default execution policy for the Windows Systems for PowerShell. PowerShell Import-Module <Module-Name> (Get-Module <Module-Name>).LogPipelineExecutionDetails = $true To turn on module logging for all sessions on a particular computer, add the previous commands to the 'All Users' PowerShell profile ( $Profile.AllUsersAllHosts ). Open Group policy management tool either on Active Directory or from client where RSAT tool is installed. You need to go in the registry and edit the following key HKLM:\Software\Policies\Microsoft\Windows\PowerShell and change the ExecutionPolicy value to ByPass.