This happens very often. Usually I was rejoining workstation/server to the domain. However it is easier way to do it.
- You have to log in to the server with a broken relationship.
- You have to know the name of Domain Controller (example: AD01)
$DomainCred = Get-Credential
Reset-ComputerMachinePassword -Server "AD01" -Credential $DomainCred
This happens very often that you are going to services.msc and you want to restart service and after a few seconds, you see that service is hung (grey out).
Step1. Grab the name of the service.
Step2. Get PID of the service.
sc queryex servername
Step3. Kill the PID
taskkill /f /pid [PID]
That’s all, now you can start service in service console.