Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NickTheGreek

Fix for PowerShell Script Not Digitally Signed

Recommended Posts

Running a .ps1 PowerShell script will sometimes result in the following message:

“<script>.ps1 is not digitally signed.  The script will not execute on the system.”

PowerShell PS1 Not Digitally Signed

 

The fix is to run Set-ExecutionPolicy and change the Execution Policy setting.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

PowerShell Set-ExecutionPolicy

This command sets the execution policy to bypass for only the current PowerShell session  After the window is closed, the next PowerShell session will open running with the default execution policy.  “Bypass” means nothing is blocked and no warnings, prompts, or messages will be displayed.

 

Possible values for the -ExecutionPolicy parameter:

— Restricted: The default setting which does not load configuration files or run scripts.

— AllSigned: Requires that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the local computer.

— RemoteSigned: Requires that all scripts and configuration files downloaded from the Internet be signed by a trusted remote publisher.

— Unrestricted: Loads all configuration files and runs all scripts. If you run an unsigned script that was downloaded from the Internet, you are prompted for permission before it runs.

— Bypass: Nothing is blocked and there are no warnings or prompts.

— Undefined: Removes the currently assigned execution policy from the current scope, returning the session to the default.  This parameter will not remove an execution policy that is set in a Active Directory Group Policy.

 

See the Microsoft Set-ExecutionPolicy cmdlet details here

 

http://tritoneco.com/2014/02/21/fix-for-powershell-script-not-digitally-signed/

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×