The team at Root Point automated a script to fix a site that had a failed NetLogon service on all computers because of a broken GPO policy.
The service NetLogon failed because its dependent service, LanManWorkstation (workstation) as well as LanManServer (Server) failed on all machines.
Workstation Services also failed to work after reboot because of the dependencies were not registerd properly.
We used this script to fix the dependencies and restart the services and fix the machines and finally verify the services were running properly:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanManServer" /v "DependOnService" /t REG_MULTI_SZ /d SamSS\0Srv2\0 /f reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanManWorkstation" /v "DependOnService" /t REG_MULTI_SZ /d Bowser\0MRxSMB20\0NSI\0 /f sc.exe config lanmanworkstation depend=bowser/mrxsmb20/nsi sc.exe config lanmanserver depend=samss/srv2 restart-service workstation -force restart-service server -force restart-service netlogon -force get-service workstation get-service server get-service netlogon
