PowerShell scripts – Signing Error

Can’t Execute

If you attempt to execute a PowerShell script on the SharePoint server and  see : “Script cannot loaded.  The file is not digitally signed.  The script will not be executed on the system” or “… the execution of the script is disabled on the system…”

It means you either need to :

Sign the script OR

Set the PowerShell execution policy to allow you to execute unsigned scripts, e.g.

powershell.exe -executionpolicy bypass -file C:\script.ps1

Can’t Update

If you want to make changes to a PowerShell script but you are always prompted to save as a new version, the file may be locked. Right click the script file and select Properties. Ensure the Read-Only checkbox is unchecked. If there is a Unblock button next to the Read Only property, click Unblock.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s