How to Fix PowerShell is Not Digitally Signed Error: 5 Ways

Changing the Execution Policy is the easiest way to fix this issue

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

powershell not digitally signed
A message from our partner

Resolve multiple Windows PC issues and speed up your PC effortlessly with specialized software.

  • Download HelpSoft PC Cleaner and install it on your PC.
  • Click on Start Scan button to find corrupt or broken files that affect your PC.
  • Now the software will start the fixing process and boost your PC performance.
Download now HelpSoft PC Cleaner has been downloaded by 0 readers this month

If you have tried to run a PowerShell script that isn’t signed, you’ve likely stumbled upon the following error <PowerShell Script file> is not digitally signed. You cannot run this script on the current system.

Windows PowerShell is a shell initially developed by Microsoft for task automation and configuration management. There’s no wonder that its Execution Policy is set to Restricted, which protects from running malicious scripts.

If you’d like to sign the script and solve this, here are a few methods that may help.

How do I make a PowerShell script digitally signed?

1. Check and change the Execution Policy

  1. Press the Windows key, type powershell, and click Run as administrator under Windows PowerShell.
    powershell powershell not digitally signed
  2. Next, type the command below and hit Enter to check your Executions policy: Get-ExecutionPolicy
  3. Check if your policy is set to Restricted.
    get
  4. Now, type the command below and press Enter to set it to unrestricted: Set-ExecutionPolicy -ExecutionPolicy unrestrictedset
  5. Finally, press Y to confirm the change and wait for the command to finish running.

The first thing to do if your PowerShell script is not digitally signed is to change your Execution. This removes the restrictions preventing your script from running and lets you run all types of scripts.

2. Bypass the current PowerShell session

  1. Press the Windows key + X and select Windows PowerShell (Admin).
    power
  2. Type the commands below and hit Enter to run it: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypassbypass powershell not digitally signed
  3. Wait for the command to finish running.

Another quick fix for the PowerShell script file is not digitally signed issue is to set the execution policy to bypass the current PowerShell session. Even better, these settings will be lost once you close this PowerShell session.

3. Unblock the file that was downloaded

  1. Right-click the Start icon and select Windows PowerShell (Admin).
    power
  2. Type the command below and hit Enter: PS C:> Unblock-File -Path C:Downloadsscript1.ps1unblock
  3. Finally, wait for the command to finish running and run the script again.

When the Execution Policy is RemoteSigned, this requires that all scripts and configuration files downloaded from the Internet or emails are signed by a trusted publisher.

If you trust the script’s contents are safe, you can unblock it to run on your session. The easiest way to do this is to use the Unblock-File cmdlet, as shown above.

4. Update Powershell

  1. Open Powershell and run this command: $PSVersionTable.PSVersionpowershell version command
  2. Check Powershell’s latest version on Github and download it if it does not correspond to yours.
  3. Run the installer and follow the on-screen instructions to complete the installation.

5. Use Group Policy Editor to allow scripts

  1. Press Windows key + R to open the Run pane.
  2. Typegpedit.msc” and press Enter.gpedit command run
  3. Go to Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell.powershell settings in group policy editor
  4. Look for the setting named Turn on Script Execution and double click on it to open its components.turn on script execution windows powershell
  5. Select the Enabled option.script execution enabled
  6. In the Options section, from the dropdown menu pick Allow all scripts.allow all scripts
  7. Click the OK button to save settings.

There you have it. With the three solutions in this guide, you should be able to get rid of the PowerShell script not digitally signed error.

If you want to know how to stop PowerShell from closing after running a script, check our detailed guide to do it easily.

Feel free to let us know the solution that helped you fix this issue in the comments below.

More about the topics: error, Microsoft PowerShell

User forum

0 messages