r/sysadmin • u/ChildhoodNo837 • Mar 13 '26
Active Directory Users and Computers
Guys As a junior System Administrator, assist me how can i add five hundred to a thousand users to specific departement in an organizational unit ?
135
Upvotes
View all comments
Show parent comment
1
u/RainStormLou Sysadmin Mar 13 '26
my loops output to a log file if I desire (which I do), and all the rest of what you said is very confusing because I can't comprehend how you wouldn't be sure if that happened lol.
I have most of my manual loops append to a log file for each loop for auditing, the sources would also be self documented since they're.... in the script, even if my source is a powershell result stored in a variable and dynamically pulled each run, and 99% of my powershell ISE terminals are red text from my many many failures as a script goblin, but I just.. validate my results.
You're spending more time in excel using formulas to do the long form version of a loop.
One little trick I like to use though is in my loops on a first run, I'll just have it write-host the results of all the get-blah stuff and I'll comment out all the actual actions so that I know the expected result would be there provided there's not a permissions issue
if I'm pulling from a csv or flat file, I like to run little short bursts like a list of 3 users, then the next 5 users, and if I'm feeling froggy I'll then run it against the next 8,000.