Summary If your servers require a reg key and unsure if its properly configured. You can use this script to check if the key is present or is set to the correct value across multiple servers. The Script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#Simple Server list $servers = Get-Content C:\servers.txt # Loop through all servers and check key foreach ($server in $servers) { $REG = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $server) $REGKEY = $REG.OpenSubKey("SYSTEM\CurrentControlSet\Control\Lsa") $val = $REGKEY.GetValue("DisableLoopBackCheck") # If the key is missing or not set it will be displayed in red # If the key is set it will be displayed in green if (!$val){ Write-Host $server "is not set" -ForegroundColor Red } if ($val -ne "1"){ Write-Host $server "is not set properly" -ForegroundColor Red } else{ Write-Host $server "is set" -ForegroundColor Green } } |
What the Script Does In the sample above it will check the “DisableLoopBackCheck” key across a […]