Bobcares

PowerShell is not digitally signed – Fix it now

by | Oct 23, 2020

The PowerShell is not a digitally signed error often triggers while users run PowerShell scripts. It generally happens due to the values set for the PowerShell Execution Policy.

As a part of our Server Management Services, we help our Customers to fix windows related errors regularly.

Let us today discuss the possible causes and fixes for this error.

 

What is PowerShell is not digitally signed error?

While trying to run a PowerShell script that has not been signed by Trusted Publisher, users often see a security error “PowerShell is not digitally signed” as shown below:

powershell is not digitally signed error

This security error can occur when we have an AllSigned or RemoteSigned PowerShell Execution Policy.

Now, let us now discuss some possible methods to fix this error.

 

How to fix PowerShell is not a digitally signed error?

There are a few possible methods to fix this error. Let us have a look at each of them one by one.

Check and change Execution Policy

The first step here is to check the Execution Policy. We may run Get-ExecutionPolicy cmdlet to get the Execution Policy. The list parameter in the Get-ExecutionPolicy cmdlet tells us the policy for each scope.

PS C:\> Get-ExecutionPolicy -list

Once we have an idea of the Execution policies, the easiest but insecure method of getting rid of this error message is to change the ExecutionPolicy to unrestricted.

Further, we can change the Execution Policy using the SetExecutionPolicy cmdlet. The following command sets the execution policy to Unrestricted:

PS C:> Set-ExecutionPolicy unrestricted.

Press Y to confirm the change when prompted.

It then updates the policy change in the registry and remains this way until we change it again

Bypass the current PowerShell session

To change the execution policy temporarily, we can use Set-ExecutionPolicy cmdlet with ByPass setting.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy  ByPass

This simple command above will set the execution policy to bypass the current PowerShell session. Once we close this PowerShell session, it loses these settings.

Acceptable values for ExecutionPolicy parameter

Below is the detail of the acceptable values for -ExecutionPolicy parameter:

  • Restricted. Does not load configuration files or run scripts. Restricted is the default execution policy.
  • AllSigned. Requires a trusted publisher to sign all scripts and configuration files, including scripts that we write on the local computer.
  • RemoteSigned. Requires a trusted publisher to sign all scripts and configuration files downloaded from the Internet.
  • Unrestricted. Loads all configuration files and runs all scripts. Asks for permission if we run an unsigned script downloaded from the Internet.
  • Bypass. Will not block anything and there are no warnings or prompts.
  • Undefined. Removes the currently assigned execution policy from the current scope. This parameter will not remove an execution policy set in a Group Policy Scope.

The default scope for Set-ExecutionPolicy command is LocalMachine. We can also specify the scope for policy by adding -Scope parameter.  For instance, some of the scopes that we can set include:

  • Process: The execution policy affects only the current PowerShell process.
  • CurrentUser: The execution policy affects only the current user.
  • LocalMachine: The execution policy affects all users of the computer.

Further, to remove an execution policy from a particular scope, set the execution policy for that scope to Undefined.

Unblock the downloaded file

For RemoteSignedExecution Policy, sign all the scripts and configuration files downloaded from the Internet or from emails by a trusted publisher.

If we trust the contents of the script are safe, then we can unblock it to run on the session using the Unblock-File cmdlet:

PS C:> Unblock-File -Path C:Downloadsscript1.ps1

[Need any further assistance to fix Powershell is not digitally signed error? – We’re available 24*7]

Conclusion

In short, PowerShell is not digitally signed security error can occur when the PowerShell Execution Policy is set to AllSigned or RemoteSigned. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF