Restore AD Trust Relationship

Hi,

I'm a long-time fan of TeamViewer. Now in a new support role, taking over from a previous team that left little in the way of documentaiton.

What I need is a way to identify the TV remote PC in PowerShell (i.e. $ComputerName) or WMIC to send a few commands as Admin.

If I were on-site, I could boot from a USB key, add myself as local admin. Login as Admin. Off the domain, then back on the domain. Fixed.

I think this can be done with the API... No idea where I should be entering those commands. (Telnet or Putty?)

Any good ideas? Please be -very- specific as to the tools I should be using.

Thanks in advance!