• Skip to main content
  • Skip to primary sidebar

Technipages

Smart phone, gadget and computer tutorials

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About

Fix “Access to the registry key is denied” Error When Setting Policy For PowerShell Scripts

By Mitch Bartlett Leave a Comment

When trying to set the execution policy for PowerShell scripts on your Windows system, you may get the following error:

Set-ExecutionPolicy : Access to the registry key
‘HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell’ is denied.
At line:1 char:1

This error is often displayed because you are not executing the command as an administrator. To solve this issue, try the following.

    1. Ensure you are logged into the computer with local administrator rights.
    2. Right-click or hold “Shift” and select “Windows PowerShell“ > “Run as administrator“.
      Run PowerShell as admin
    3. Now try to run the same set-executionpolicy  command to change the execution policy. It should complete successfully.

You Might Also Like

  • Error: "User username (SessionId=2) could not be logged off. Access is denied."
    Error: "User username (SessionId=2) could not be…
  • Acrobat Reader 11: Fix "There was an error opening this document. Access denied."
    Acrobat Reader 11: Fix "There was an error opening…
  • How to Set PowerShell Execution Policy
    How to Set PowerShell Execution Policy
  • Windows: "Access Denied" When Running Attrib
    Windows: "Access Denied" When Running Attrib
  • Windows 10: Access Denied When Modifying HOSTS or LMHOSTS file
    Windows 10: Access Denied When Modifying HOSTS or…
  • Fix Sublime Text Error Permission Denied
    Fix Sublime Text Error Permission Denied
  • What Is the Windows Registry and How to Access It?
    What Is the Windows Registry and How to Access It?
  • How to Disable Access to the Registry Editor - Windows 10
    How to Disable Access to the Registry Editor - Windows 10
  • Fix Chromebook Error Setting Up Printer
    Fix Chromebook Error Setting Up Printer

Filed Under: Windows Tagged With: PowerShell

Reader Interactions

Did this help? Let us know! Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • Fix Skype Error: Exchange Needs Your Credentials
  • Fix Skype Notifications Not Working on Windows 10
  • Teams in Outlook: We Couldn’t Schedule the Meeting
  • VR Oculus Quest 2: How to Configure a New Room-Scale Boundary
  • VR Oculus Quest 2: How to Adjust Boundary Sensitivity
  • Dropbox: How To Change the Date Format
  • Microsoft Teams: There Was a Problem Saving the Photo
  • VR Oculus Quest 2: How to Set up Oculus Link

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Follow me on Twitter, or visit my personal blog.

You May Also Like

  • Random Access Memory (RAM)

© Copyright 2021 Technipages · All Rights Reserved · Privacy