One of the first issues I have encountered is when the school year starts and all the students come back. We reset everyone's password just before school starts to help reduce the forgotten password issues. While this has shown to reduce password issues, with 2000+ kids, some are bound to forget. In order to make this quick and simple, I turned to powershell. While Active Directory Users and Computers(ADUC) is quite easy to unlock accounts, I wanted to make it a little quicker. Here's what I used:
Search-ADAccount -LockedOut
This command searches through all of Active Directory and returns the accounts locked out. From there I can run:
Unlock-ADAccount -Identity <SAMAccountName> or <Distinguished Name>
The Search-ADAccount commmand returns the SAMAccountName and Distinguished Name which the Unlock cmdlet can handle either one:
Unlock-ADAccount -Identity AndyE
Unlock-ADAccount -Identity "CN=AndyE,OU=Users,DC=domain,DC=com"
While these are nice for handling one account at a time, I run into situations where there is a line of students outside my door with locked out accounts.
I needed a faster way to to unlock accounts than one at a time. Luckily, with the pipline symbol I can combine more than one command. This ultimately led to me using:
Search-ADAccount -LockedOut | Unlock-ADAccount
If you maybe haven't noticed, I prefer one liners to get things done. I have written fairly complex scripts for creating users and other tasks. I still prefer the quickest and easiest way to accomplish a task. I'm sure there are probably more elaborate ways to handle these issues, these commands are what works for me and my environment.
Subscribe to:
Post Comments (Atom)
-
We have quite a bit of mobility with our students. When a student leaves we typically hold on to their accounts for a while. It seems ...
-
A new project came up for me that involved rebuilding our System Center Configuration Manager servers. Being a small environment, our Con...
-
So it's been a little while since I blogged. Its been a busy winter and not much happened in my world regarding automation and p...
Those who play for fun might not return if there are not any free bonuses. This is why Ignition Casino offers so many bonuses to ensure that|to make certain that} even the broke players have a chance to redeem. If would possibly be} amongst casual gamblers, this platform 온라인카지노 is the most effective due to its daily and weekly bonuses. If you're a fan of incomes a lot of cash without a a|with no} tense poker sport, mBit Casino is a superb option. This on line casino is famous for its free slot machines and unique slot games. You need to be their premium member in order to to} access the unique slot games the place find a way to|you presumably can} earn more than traditional.
ReplyDelete