Řeší chyby:
The trust relationship between this workstation and the primary domain failed.Zpracování zásad skupiny selhalo v důsledku toho, že se nebylo v síti možné připojit k řadiči domény.(kdy User Policy projde, ale Computer Policy selže kvůli neplatným Kerberos ticketům účtu SYSTEM 0x3e7).
$D=(Get-CimInstance Win32_ComputerSystem).Domain; if(Test-ComputerSecureChannel -Repair -Credential (Get-Credential "$D\Administrator") -Verbose){klist purge|Out-Null; klist -li 0x3e7 purge|Out-Null; ipconfig /flushdns|Out-Null; w32tm /resync /force|Out-Null; Restart-Service Netlogon -Force; gpupdate /force; Write-Host "Oprava dokoncena!" -ForegroundColor Green}else{Write-Warning "Oprava selhala, zkontroluj DNS a dostupnost DC."}