i need a soloution which collect all users from a location in AD and add them to a "location All Users" Group
i have tried Powershell but this was far to slow to run once a day in our enviroment.
parameter for our enviroment (6 Domain Productiv , 6 Domains Integration) arround 200000 User 300 Location
Goal would be to have a script/program witch can collect all users in a location and add them to the all Users Group and remove if not anymore in this location or disabled.
structure AD
root\world\country\location
so what i would need as C# dummy is a base script for checking
6 or 12 Domains and doing some work in each Domain
in Powershell i had a soloution like this
ForEach ($which in $DC) {
$DomName = ($which | Select-Object -unique -First 2).Split(".")[1]
Switch ($DomName){
"auto"
.....and so on Zip includes the PS script which changed with replaced Server and Domains
greetings

Answers
Know the answer? Post it. Somebody with the same question will find it here.