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?
This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.
e.g.
$name = $Env:ComputerName
$cred = Get-Credential
Add-Computer -WorkgroupName WORKGROUP -ComputerName $name
Add-Computer -Domain domain-name -Credential $cred -ComputerName $name