Skip to content

Changing PowerShell Execution Policy

Execution policies are a PowerShell security feature and apply to scripts run by UNIFYConnect. This page describes how to configure the policy when required.

Globally

WARNING

This method is only possible if PowerShell 7 is installed on the host machine. If this is not the case, use an alternate method of configuration, such as the Local option outlined below.

The Set-ExecutionPolicy cmdlet changes the execution policy. A policy set for the LocalMachine scope, or for the UNIFYConnect service account under CurrentUser, is used by UNIFYConnect PowerShell scripts.

Locally for UNIFYConnect

Create %InstallDir%\Services\Libs\powershell.config.json and populate it with the required policy. For example:

json
{ 
  "Microsoft.PowerShell:ExecutionPolicy": "Unrestricted"
}

TIP

Local configuration will take precedence over global configuration, if PowerShell 7 is installed on the host machine.