Using PowerShell as the Shell on Windows Server Core

With PowerShell becoming one of the most important tools in a Windows administrator’s tool bag as well as really becoming the best prompt to use on Windows Server Core, I thought it was about time I documented how to change the command prompt that opens when you log into Server Core with a PowerShell prompt.

To complete this requires two steps:

  1. Enable/Install PowerShell on the Windows 2008 R2 Server Core computer
  2. Update the HKLMSoftwareMicrosoftWindows NTCurrentVersionWinLogonShell registry key replacing cmd.exe with PowerShell.exe

To enable PowerShell run SCONFIG from the command prompt and then select menu options 4 then 2. This will require the computer to be rebooted

Once rebooted login and in the CMD prompt type PowerShell. At the PowerShell prompt type:

SET-ITEMPROPERTY "HKLM: SOFTWAREMICROSOFTWINDOWS NTCURRENTVERSIONWINLOGON" SHELL POWERSHELL.EXE

Having completed above log off and back on and a powershell prompt will open instead.

~Pouyan

Disable initial configuration tasks and server manager pop up when an admin logs

To disable automatic launching via regkey, you can set these values.

For Server Manager, you need to set:

[shell]

HKEY_CUURENT_USERSoftwareMicrosoftServerManagerDoNotOpenServerManagerAtLogon (REG_DWORD) to 1

[/shell]

For Initial Configuration Tasks, you need to set:

[shell]

HKEY_LOCAL_MACHINESoftwareMicrosoftServerManagerOobe
DoNotOpenInitialConfigurationTasksAtLogon (REG_DWORD) to 1

[/shell]

Install and Configure RDS role with powershell

I will explain how you can install and configure RDS role on a MS Windows 2008 R2.

First we need to install the RDS role, here I will not install the RDWeb or RDbroker services just a RDS(Terminal) server.

With this command we will install the RDS Role
[powershell]Import-Module ServerManager
Add-WindowsFeature RDS-RD-Server[/powershell]
After installing the RDS role we need