![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to enable Power shell scripts I want to run some power shell scripts for tests. I have run the command below, but I'm getting the error below. PS C:\TEMP> Set-ExecutionPolicy Unrestricted Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft ..PowerShell' is denied. I am an Administrator I checked the registry and nothing in there to allow for this option. Its great to secure scriptiing this way, but can anyone help on how I can get ps1 scripts to run on Vista or whats best practise on running the PS1 scripts. D -- Dee |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to enable Power shell scripts Hi Dee Quote: >I want to run some power shell scripts for tests. > > I have run the command below, but I'm getting the error below. > > PS C:\TEMP> Set-ExecutionPolicy Unrestricted > Set-ExecutionPolicy : Access to the registry key > 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft > .PowerShell' is denied. > > I am an Administrator > > I checked the registry and nothing in there to allow for this option. > > Its great to secure scriptiing this way, but can anyone help on how I can > get ps1 scripts to run on Vista or whats best practise on running the PS1 > scripts. Try opening up a powershell window with elevated privileges and running the command again (find powershell on the start menu, right click, Run as Administrator). That should work, I think -- Tomas Restrepo http://www.devdeo.com/ http://www.winterdom.com/weblog/ |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to enable Power shell scripts Dee wrote: Quote: > I want to run some power shell scripts for tests. > > I have run the command below, but I'm getting the error below. > > PS C:\TEMP> Set-ExecutionPolicy Unrestricted > Set-ExecutionPolicy : Access to the registry key > 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft > .PowerShell' is denied. > > I am an Administrator > > I checked the registry and nothing in there to allow for this option. > > Its great to secure scriptiing this way, but can anyone help on how I can > get ps1 scripts to run on Vista or whats best practise on running the PS1 > scripts. > > D > "RemoteSigned". This way you would initially get a warning about scripts downloaded from the Internet before being able to run them (if not signed). Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to enable Power shell scripts Thomas, Quote: > > I'd argue this point a bit. > > For me, this policy has no real effect - I use FireFox and it does not set > the alternate data stream to indicate a script was downloaded from the > internet. Quote: > I'd argue that requiring signing of all scripts is probably safer but more > of a PITA. and signing them? Or, put it another way, how many people go around download scripts and blindly executing them without looking at the script contents? -- Tomas Restrepo http://www.devdeo.com/ http://www.winterdom.com/weblog/ |
My System Specs![]() |
| | #5 (permalink) |
| | Re: How to enable Power shell scripts "Tomas Restrepo [MVP]" <tomasr@xxxxxx> wrote in message news:eSinbDpiIHA.4396@xxxxxx Quote: > Thomas, Quote: >> >> I'd argue this point a bit. >> >> For me, this policy has no real effect - I use FireFox and it does not >> set the alternate data stream to indicate a script was downloaded from >> the internet. > <chuckle> > Quote: >> I'd argue that requiring signing of all scripts is probably safer but >> more of a PITA. > But is this realistic? I mean, is anyone writing their own custom scripts > and signing them? scripts that we use in production. Quote: > Or, put it another way, how many people go around download scripts and > blindly executing them without looking at the script contents? -- Keith |
My System Specs![]() |
| | #6 (permalink) |
| | Re: How to enable Power shell scripts Hi All IT worked.. I ran powershell as Administrator, chenged the policy to remotesigned and then the script. Many thanks for your help and the interesting comments re the security issues. D -- Dee "Keith Hill [MVP]" wrote: Quote: > "Tomas Restrepo [MVP]" <tomasr@xxxxxx> wrote in message > news:eSinbDpiIHA.4396@xxxxxx Quote: > > Thomas, Quote: > >> > >> I'd argue this point a bit. > >> > >> For me, this policy has no real effect - I use FireFox and it does not > >> set the alternate data stream to indicate a script was downloaded from > >> the internet. > > <chuckle> > > Quote: > >> I'd argue that requiring signing of all scripts is probably safer but > >> more of a PITA. > > But is this realistic? I mean, is anyone writing their own custom scripts > > and signing them? > Uh no. It is a PITA IMO and provides no benefit for the build and test > scripts that we use in production. > Quote: > > Or, put it another way, how many people go around download scripts and > > blindly executing them without looking at the script contents? > What's that phrase Gump uses - "stupid is as stupid does". :-) > > -- > Keith > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Power Shell? | PowerShell | |||
| power shell in a script | PowerShell | |||
| Executing Power Shell Scripts from Windows Shell | PowerShell | |||
| ps scripting newbie - how to make functions/scripts available in the shell? | PowerShell | |||
| power shell in x64 | PowerShell | |||