|
I'm incredibly new to Powershell, as a senior helpdesk monkey I can see how it's going to be incredibly helpful. I've got a shitload of user accounts (100+) of people that have left the company that I need to clean up/archive. My first step is to move them all into a "To be Terminated" OU. I then need to remove them from all Security/Distribution lists (except Domain Users) - this is where Powershell will come in handy as I'd prefer to run a quick script rather than go into each user and remove the groups manually! It looks like I need a script that will strip group memberships based on the object's OU. With a bit of Googling, I found this one but am having a bit of trouble deciphering it: code:
|
# ¿ Dec 16, 2011 00:25 |
|
|
# ¿ May 17, 2024 01:23 |
|
That's definitely what I need I'll keep looking!
|
# ¿ Dec 19, 2011 00:38 |
|
adaz posted:
As it turns out we're running Exch2010 here, but our DCs are still running bloody 2003 so I can't run the script.
|
# ¿ Dec 21, 2011 00:13 |
|
Hi guys, I'm slowly working my through CBT Nuggets intro to Powershell so forgive any ignorance on my part. I'm trying to build a script that prompts for a username and once it has does three things: 1. Changes the description to "Terminated - $DATE" in the format YYYY.MM.DD 2. Moves the object to a particular OU 3. Strips the object of all group memberships I've got the commands for the steps 1 and 2, except for adding the date in automatically, I'll need help there - but stripping the object is a bit of a mystery at this point. Any pointers will be much appreciated. code:
|
# ¿ Dec 9, 2013 01:57 |
|
Here's the finished product:code:
|
# ¿ Dec 11, 2013 04:59 |