Configure Windows Server Core to use PowerShell by Default

Beginning with Windows Server 2012, the core installation mode is now the default and preferred installation mode. For workloads that are supported on Windows Server core, which includes the remote access role and DirectAccess, server core should be used to provide the highest levels of security and availability.

When installing Windows Server 2012/R2 core, the operating system defaults to using the old DOS command prompt. I find this particularly annoying since the majority of administration I do on a server core installation is in PowerShell. Also, most DOS commands can be run from the PowerShell console anyway, so why not have PowerShell as the default shell? Well, that’s easy enough to fix. To begin, at the command prompt enter start powershell.

DirectAccess Windows Server Core PowerShell

In the PowerShell window enter the following command:

Set-ItemProperty -Path ‘HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon’ -Name Shell -Value PowerShell.exe

DirectAccess Windows Server Core PowerShell

Log off the computer and when you log back in, PowerShell will be the default shell! If you need to execute DOS commands that don’t seem to work in PowerShell, simply enter cmd and you’re good to go.

DirectAccess Windows Server Core PowerShell

Leave a comment

2 Comments

  1. DirectAccess on Windows Server 2016 Core | Richard M. Hicks Consulting, Inc.
  2. PowerShell Recommended Reading for DirectAccess and Always On VPN Administrators | Richard M. Hicks Consulting, Inc.

Leave a Reply

Discover more from Richard M. Hicks Consulting, Inc.

Subscribe now to keep reading and get access to the full archive.

Continue reading