Solved

I can't run powershell in Windows 7

Posted on 2010-09-17
3
623 Views
Last Modified: 2012-05-10
I have Windows 7 32 bit and when I run set-executionpolicy remotesigned it gives me the error I do not have rights to the registry.  I am in the administrators group.  This is my home machine, I am not on a domain.  How do I fix this so I can run scripts?  I powershell v2.
0
Comment
Question by:BrianSDG
3 Comments
 
LVL 21

Accepted Solution

by:
chapmanjw earned 500 total points
ID: 33706595
You need to run PowerShell as administrator.  Right click, Run As Administrator.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33706739
You can download this registry entry to fix all those annoying privileged errors. Once you download it, just double click it to install. You will then have a right click menu to take ownership. http://www.sevenforums.com/tutorials/1911-take-ownership-shortcut.html

Well, that won't help you on this error, but it is nice to have. You can follow the instructions on this EE Post: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/A_2846-Use-the-Administrator-account-by-default-in-Vista.html
0
 
LVL 7

Expert Comment

by:thakurdinesh
ID: 33706744
set-ExecutionPolicy : Access to the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds
\Microsoft
.PowerShell' is denied.
At line:1 char:20
+ Set-ExecutionPolicy <<<<  RemoteSigned
    + CategoryInfo          : NotSpecified: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyComma
   nd


How to fix this?
 
Right click on Powershell shortcut and choose 'Run as Administrator'

Also note that if you have a 64-bit OS you need to set the execution policy for both the 32-bit and 64-bit version of PowerShell.
Thanks
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
A brief introduction to what I consider to be the best editor for PowerShell.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question