Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect and fix trust relationship issue automatically #99

JonathanPitre opened this issue May 9, 2019 · 0 comments


2 participants
Copy link

commented May 9, 2019

It,s quite common with master images to get trust relationship issues when they get disconnected from the domain for too long for instance. We could detect the event log that indicate that there is a trust relationship issue and run the appropriate powershell commands to fix it automatically.

Reset-ComputerMachinePassword -Server $env:logonserver -Credential $env:USERDOMAIN$env:USERNAME
Test-ComputerSecureChannel -Repair -Credential $env:USERDOMAIN$env:USERNAME
nltest /

How to detect the event log id:

(Get-EvenLog -LogName System -after ((Get-Date).AddDays(-1))).Where{$.InstanceID -eq "5723 -Or $.InstanceID -eq "5721"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.