{"id":897,"date":"2019-02-23T15:21:25","date_gmt":"2019-02-23T14:21:25","guid":{"rendered":"https:\/\/jeremyverda.net\/?p=897"},"modified":"2019-02-23T15:22:41","modified_gmt":"2019-02-23T14:22:41","slug":"change-openssh-server-default-shell-on-windows-server-2019","status":"publish","type":"post","link":"https:\/\/jeremyverda.net\/change-openssh-server-default-shell-on-windows-server-2019\/","title":{"rendered":"Change OpenSSH Server default shell on Windows Server 2019"},"content":{"rendered":"\n
If you are using OpenSSH Server on Windows Server 2019, the default shell is cmd.exe. <\/p>\n\n\n\n
If you want to set the default shell to PowerShell or even PowerShell Core, you can run the following PowerShell command (it will create a registry key) then restart the OpenSSH server service : <\/p>\n\n\n\n
New-ItemProperty -Path \"HKLM:\\SOFTWARE\\OpenSSH\" -Name DefaultShell -Value \"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -PropertyType String -Force<\/pre>\n\n\n\nIf you want to use PowerShell Core, change the path of the value variable but note that currently a path with space in directory name seems to be unsupported.<\/p>\n","protected":false},"excerpt":{"rendered":"
If you are using OpenSSH Server on Windows Server 2019, the default shell is cmd.exe. If you want to set the default shell to PowerShell or even PowerShell Core, you can run the following PowerShell command (it will create a Read More …<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[18,25],"tags":[29,28,24,27],"jetpack_publicize_connections":[],"yoast_head":"\n
Change OpenSSH Server default shell on Windows Server 2019 - J\u00e9r\u00e9my Verda's IT Blog<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n