Core prompt

The right Shell

For Windows Domain Controller I use only the Windows Server Core Version.

If you start the Core shell it greet you with an cmd.exe and every time I start my work I switch to a powershell. So I switch the defult shell to the powershell.
To get the running value type this command:

Get-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name Shell PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion PSChildName : Winlogon PSDrive : HKLM PSProvider : Microsoft.PowerShell.Core\Registry Shell : cmd.exe /c "cd /d "%USERPROFILE%" & start cmd.exe /k runonce.exe /AlternateShellStartup"

Now we change the shell to the right shell => powershell:

Set-ItemProperty -Path HKLM:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name Shell -Value "Powershell.exe -noExit -Command ( & { Set-Location -Path C:\ ;cls} )"

After a new login, viola we get a powershell...

Written by Arne Tiedemann on Wednesday May 4, 2016
Permalink - Tags: Powershell, Active, Directory

« Accidental deletion of organizational unit's - Dynamic group members »