Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Domain Unjoin and rejoin with a new domain using script

$
0
0
I have migrated the users from child domain to parent domain. Therefore i need to add them to the parent domain. Actually there are about 500 pcs to ADD. What would be the power-shell for bulk users. 
Could you please confirm whether the following script is fine?

Add-Computer –ComputerName COMP01 –Domain testlk.int –LocalCredential testlk.int\mahesh –UnjoinDomainCredential chd.testlk.int\mahesh –Credential testlk.int\mahesh –Restart

Could you please describe further to get an clear idea. 
My New domain name - testlk.int
my old domain name - chd.testlk.int
User Account - mahesh
password - Pa$$w0rd

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>