Resolve Windows 2003 Logon Screen Blackout Problems

The problem:
Administrators are unable to logon to a Windows 2003 Server. This is what they see…

The Cause:
Because… Microsoft. Just joking, most sophisticated systems have bugs. Windows 2003 is known to exhibit this weirdness that would render its logon screen as shown, especially when C:\ volume reaches critical levels of utilization. In such instances, all items under registry key “HKEY_USERS\.Default\Control Panel\Colors” would show the “three eggs” representing color codes everywhere like this…

The Fix:

# Step 1: Perform some clean up on C:\ drive
# Navigate to \\$serverName\c$ to delete known junk files

# Step 2: Enter-PSsession and make these registry changes
$serverName="WALA"
enter-pssession $serverName

# Check C:\ volume for capacity utilization
(gwmi -Class win32_volume -Filter "DriveType!=5" -ea stop| ?{$_.DriveLetter -ne $isnull}|`
Select-object @{Name="Letter";Expression={$_.DriveLetter}},`
@{Name="Label";Expression={$_.Label}},`
@{Name="Capacity";Expression={"{0:N2} GiB" -f ($_.Capacity/1073741824)}},`
@{Name = "Available"; Expression = {"{0:N2} GiB" -f ($_.FreeSpace/1073741824)}},`
@{Name = "Utilization"; Expression = {"{0:N2} %" -f ((($_.Capacity-$_.FreeSpace) / $_.Capacity)*100)}}`
| ft -autosize | Out-String).Trim()

# Sample Output to verify that C:\ volume is not at 99% utilization
Letter Label Capacity Available Utilization
------ ----- -------- --------- -----------
C: 68.35 GiB 8.02 GiB 88.27 %
D: DDrive 60.00 GiB 59.06 GiB 1.55 %

<# Other optional Test writing to registry
# Create New Key
New-Item -Path $logonPanelKey -Name "Test Key"

# Delete a Key
Remove-Item -Path "$logonPanelKey\Test Key"
#>

# Step 3: Edit its registry to resolve the issue
$logonPanelKey="REGISTRY::HKEY_USERS\.Default\Control Panel\Colors"
Set-Itemproperty -path $logonPanelKey -Name 'ActiveBorder' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'ActiveTitle' -value '10 36 106'
Set-Itemproperty -path $logonPanelKey -Name 'AppWorkSpace' -value '128 128 128'
Set-Itemproperty -path $logonPanelKey -Name 'Background' -value '102 111 116'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonAlternateFace' -value '181 181 181'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonDkShadow' -value '64 64 64'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonFace' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonHilight' -value '255 255 255'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonLight' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonShadow' -value '128 128 128'
Set-Itemproperty -path $logonPanelKey -Name 'ButtonText' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'GradientActiveTitle' -value '166 202 240'
Set-Itemproperty -path $logonPanelKey -Name 'GradientInactiveTitle' -value '192 192 192'
Set-Itemproperty -path $logonPanelKey -Name 'GrayText' -value '128 128 128'
Set-Itemproperty -path $logonPanelKey -Name 'Hilight' -value '10 36 106'
Set-Itemproperty -path $logonPanelKey -Name 'HilightText' -value '255 255 255'
Set-Itemproperty -path $logonPanelKey -Name 'HotTrackingColor' -value '0 0 128'
Set-Itemproperty -path $logonPanelKey -Name 'InactiveBorder' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'InactiveTitle' -value '128 128 128'
Set-Itemproperty -path $logonPanelKey -Name 'InactiveTitleText' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'InfoText' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'InfoWindow' -value '255 255 225'
Set-Itemproperty -path $logonPanelKey -Name 'Menu' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'MenuBar' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'MenuHilight' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'MenuText' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'Scrollbar' -value '212 208 200'
Set-Itemproperty -path $logonPanelKey -Name 'TitleText' -value '255 255 255'
Set-Itemproperty -path $logonPanelKey -Name 'Window' -value '255 255 255'
Set-Itemproperty -path $logonPanelKey -Name 'WindowFrame' -value '0 0 0'
Set-Itemproperty -path $logonPanelKey -Name 'WindowText' -value '0 0 0'

Sample Output:

[RogueSherver]: PS C:\tempcopy> $logonPanelKey="REGISTRY::HKEY_USERS\.Default\Control Panel\Colors"
[RogueSherver]: PS C:\tempcopy> Set-Itemproperty -path $logonPanelKey -Name 'ActiveBorder' -value '212 208 200'
[RogueSherver]: PS C:\tempcopy> Set-Itemproperty -path $logonPanelKey -Name 'ActiveTitle' -value '10 36 106'
[RogueSherver]: PS C:\tempcopy> Set-Itemproperty -path $logonPanelKey -Name 'AppWorkSpace' -value '128 128 128'
------------------ You get the idea ----------------------

Leave a Reply

Your email address will not be published. Required fields are marked *