http://blogs.technet.com/b/heyscriptingguy/archive/2011/08/31/use-powershell-to-find-locked-out-user-accounts.aspx
If you really dont care about statuses and details, you can more easily blindly send NET USE or WMIC commands to unlock or [re]activate the account. -- Espi On Mon, May 11, 2015 at 6:48 AM, David McSpadden <[email protected]> wrote: > I want to schedule a powershell to check for a specific account to see > if it is locked out. > > If it is unlock it. > > Or I can just submit the unlock blindly at a specific time each day. > > I don't care either way. > > DC is server 2012 r2. > > Account is an application admin with domain admin rights. > > Need account to be unlocked prior to copying files to server. > > Have been biten that last couple weekend because support tech's have been > locking it out and not emailing us that it needs unlocked. > > Thanks > > > > *David McSpadden* > > Systems Administrator > > Indiana Members Credit Union > > P: 317.554.8190 | F: 317.554.8106 > > [image: Description: imcu email icon] <http://imcu.com/> [image: > Description: facebook email icon] > <https://www.facebook.com/IndianaMembersCU> [image: Description: twitter > email icon] <https://twitter.com/IndMembersCU> > > > > [image: Description: email logo] > > [image: mcp2] > > > > This e-mail and any files transmitted with it are property of Indiana > Members Credit Union, are confidential, and are intended solely for the use > of the individual or entity to whom this e-mail is addressed. If you are > not one of the named recipient(s) or otherwise have reason to believe that > you have received this message in error, please notify the sender and > delete this message immediately from your computer. Any other use, > retention, dissemination, forwarding, printing, or copying of this email is > strictly prohibited. > > Please consider the environment before printing this email. >
