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