janhoedt
asked on
Remove/rejoin computer to domain via Powershell script?
Hi,
I need to revert to an ESXI vmware snapshot of a vm all the time.
Regularely I get the message "trust relationship between this workstation and the domain failed".
I need to remove it from the domain, reboot add it to the domain reboot what is ennoying.
Please advise howto do this in an easier way, via Powershell or other?
J.
I need to revert to an ESXI vmware snapshot of a vm all the time.
Regularely I get the message "trust relationship between this workstation and the domain failed".
I need to remove it from the domain, reboot add it to the domain reboot what is ennoying.
Please advise howto do this in an easier way, via Powershell or other?
J.
ASKER
Ok, but howto do this remotely?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.g.
$name = $Env:ComputerName
$cred = Get-Credential
Add-Computer -WorkgroupName WORKGROUP -ComputerName $name
Add-Computer -Domain domain-name -Credential $cred -ComputerName $name