Saturday 8 March 2014

Auto load PowerShell Window in Server Core

When working with a server core I like to have a PowerShell window open. Here is a quick way to do it.

You could just type PowerShell in the cmd window to turn it into a PowerShell window or type Start PowerShell to open a separate PowerShell window.

To have it there waiting for you:

  1. From cmd prompt run Regedit
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  3. Add string Value called PowerShell with value cmd.exe /k %windir%\system32\WindowsPowerShell\v1.0\powershell.exe.

Alternatively use the PowerShell Command

New-ItemProperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\run -Name PowerShell -Value C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -Type string

No comments:

Post a Comment