Bart's Weblog

Just a blog…

Archive for April, 2008

PowerShell: ExecutionPolicy

Posted by bartvdw on 2222/0404/2008

I know I waited far too long to start working with PowerShell. But OK, here we are. And immediately encountered something. By default it sets some security related to running scripts. Only when I did what it said, I was unable to change that security!

OK in short, after you install PowerShell, it sets the “ExecutionPolicy” for scripts to “Restricted”, which means you’re not allowed to execute scripts. Not very interesting… So I used the “Set-ExecutionPolicy RemoteSigned” command to change, but this returned an error:
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

  • Open registry
  • Browse to key HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
  • If “ExecutionPolicy” does not exist, create it as REG_SZ with value “RemoteSigned”
  • Open PowerShell and use the command “Get-ExecutionPolicy” to see it is done correctly

It’s only obvious that if another security level is desired, you adapt the value… 🙂


Posted in PowerShell, Scripting | 14 Comments »

Windows Command Reference

Posted by bartvdw on 0202/0404/2008

Great, they have release a command reference for Windows Vista, Windows Server 2003, and Windows Server 2008! And this in a very handy .chm file!

Windows Command Reference

Posted in Windows | Leave a Comment »

Joe Bar Team: Official website

Posted by bartvdw on 0202/0404/2008

(Sorry it’s in French only apparently…)

Posted in Fun | Leave a Comment »

DFS: Important fixes

Posted by bartvdw on 0202/0404/2008

"The request is not supported" error message when you try to create a second DFS domain root

You cannot create more than one domain-based DFS namespace on a computer that is running Windows Server 2003, Standard Edition

Posted in Windows | Leave a Comment »