cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Steinerfilm
Engaged Sweeper
Hello,

As some of you may know sometimes the trust relationship between a workstation and the primary domain failes.

There are many many articles in the web why this happens and how to fix it.
A good one is this:
http://implbits.com/About/Blog/tabid/78/post/don-t-rejoin-to-fix-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/Default.aspx

As you can see there you can reset the machine account password with a script and it works fine.
Sorowly it's rather ineffective to do this by going to a workstation.

My idea now is to create a custom action to execute the command but i'm not very good at creating batch files.
Maybe someone of you can read the linked text above and help me to create a batch-file or something like that which can be run like for example this:

{actionpath}shellrunas.exe /accepteula cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f -h {actionpath}wmifix.cmd
Just a short description what this command does:
Well simply it opens an command window as another user (credentials are asked for).
Then it executes psexec in that user context. It need to be an administrator to get psexec working. That's why i first do a "shellrunas".
Psexec then runs the batch file on the defined remote computer.

What i need now is the correct script with variables.

Or maybe someone has another idea how to get this work.

Greetings
4 REPLIES 4
EB
Engaged Sweeper III


You are not alone in strongly disliking this problem. Dirty bugger!

Perhaps using pc local credentials could use a remote cmd?

Hemoco
Lansweeper Alumni
EB wrote:
Perhaps using pc local credentials could use a remote cmd?

That might work, maybe you can try to connect to \IPC$ first with local credentials.
Steinerfilm
Engaged Sweeper

You're right.
My fault.
Hemoco
Lansweeper Alumni
If the trust fails it won't be possible to use psexec to authenticate to the workstation.
You will need to run the script manually on the remote machine.