Solved

I can't run powershell in Windows 7

Posted on 2010-09-17
3
608 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
Set OWA language and time zone in Exchange for individuals, all users or per database.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now