Created
November 17, 2022 17:53
-
-
Save pcdoyle/690c4fb24052309a6e2302154e5bd623 to your computer and use it in GitHub Desktop.
These are the commands to change the login shell for Windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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