Created domain account in each domain add it to domain admin group
$domains = (get-adforest).domains
foreach($domain in $domains){
$accountname = ‘s-coe-‘+($domain -split “.”)[0]+’-DA’
$accountpass = ‘P@ssword123456’ | ConvertTo-SecureString -Force -AsPlainText
Write-Output “Working on $domain – DA is $accountname”
New-ADUser -name $accountname -SamAccountName $accountname -AccountPassword $accountpass -Enabled $true -Server $domain
start-sleep -Seconds 5
Add-ADGroupMember -Identity “Domain Admins” -Members $accountname -Server $domain
}
Remove domain account in each domain
$domains = (get-adforest).domains
foreach($domain in $domains){
$accountname = ‘s-coe-‘+($domain -split “.”)[0]+’-DA’
get-aduser $accountname -Server $domain | Remove-ADUser -Server $domain -Verbose -Confirm:$false
}
umactc
l6geaa
pp09cm
It’s appropriate time to make a few plans for the longer term and it’s time to be happy. I’ve learn this put up and if I may I desire to suggest you some fascinating things or suggestions. Maybe you could write next articles regarding this article. I desire to learn more things approximately it!
This is a very good tips especially to those new to blogosphere, brief and accurate information… Thanks for sharing this one. A must read article.
I am glad to be a visitor of this utter web site! , thankyou for this rare info ! .
You really make it seem so easy with your presentation but I in finding this topic to be actually something which I feel I might by no means understand. It seems too complex and very extensive for me. I am taking a look ahead in your subsequent publish, I’ll try to get the cling of it!
Way cool, some valid points! I appreciate you making this article available, the rest of the site is also high quality. Have a fun.
iafasd
usw86a
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Appreciate it for helping out, excellent info. “If at first you don’t succeed, find out if the loser gets anything.” by Bill Lyon.
Great post. I was checking continuously this blog and I’m impressed! Very helpful info specially the last part 🙂 I care for such information a lot. I was seeking this certain info for a very long time. Thank you and best of luck.
It is in point of fact a great and useful piece of information. I am glad that you shared this useful info with us. Please stay us up to date like this. Thank you for sharing.
I discovered your blog site on google and check a few of your early posts. Continue to keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Seeking forward to reading more from you later on!…
What¦s Going down i’m new to this, I stumbled upon this I’ve found It positively useful and it has aided me out loads. I hope to give a contribution & aid other customers like its aided me. Great job.