Skip to content

Instantly share code, notes, and snippets.

@pcdoyle
Created November 17, 2022 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcdoyle/690c4fb24052309a6e2302154e5bd623 to your computer and use it in GitHub Desktop.
Save pcdoyle/690c4fb24052309a6e2302154e5bd623 to your computer and use it in GitHub Desktop.
These are the commands to change the login shell for Windows.
# To set the login shell on a Windows Core server to powershell instead of cmd:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name Shell -Value powershell.exe
# To set the login shell on a Windows Core server back to cmd instead of PowerShell:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name Shell -Value powershell.exe
# To set a regular Windows computer back to the desktop if you accidently set it to log in with powershell or cmd:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name Shell -Value explorer.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment