Executing custom scripts
In most cases, the permission to execute scripts is restricted. You can use the native PowerShell cmdlet Get-ExecutionPolicy
to check whether you have permission to execute scripts using your current account credentials and the native Set-ExecutionPolicy
cmdlet to specify an execution policy.
To check and update the execution policy for scripts
- Open the Centrify Audit Module for PowerShell.
- Verify you have permission to execute scripts.
Get-ExecutionPolicy
-
Run the
Set‑ExecutionPolicy
cmdlet to change the execution policy. For example:Set-ExecutionPolicy Unrestricted
For more information about execution policies and the options available, use the
get‑help
function. -
Verify you are in the directory where your scripts are located.
-
Execute the sample script.