[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

locked account users, powershell review

Posted on 2014-08-29
6
Medium Priority
?
192 Views
Last Modified: 2014-09-02
Hi Experts,

I did recently downloaded a powershell script from the script MS page, however the script it does not or I missing some parameters.

I am in powershell calling the script as they suggest in the link below, but it just comes right back to the powershell prompt.  No error no nothing.  I have a feeling something is not where it is supposed to be.

I did create the following folders as per indicated on the script

C:\PS\AccountLockout\Tools
C:\PS\AccountLockout\Logs

I did download the tools exactly as the link states, but can you please indicate where should I enter my domain controllers on the script? I have 10 DCs that need to enter on the code.

I did also setup the execution policy in powershell to unrestricted, and Remotesigned, with no luck

By the way, I also imported the AD powershell module


Any ideas where to update the domain controllers on the script to use my new 10 DCs and then run the script?

http://gallery.technet.microsoft.com/scriptcenter/83f9132f-e508-4ee8-941f-45c2b602bfea/view/Discussions#content
0
Comment
Question by:Jerry Seinfield
  • 4
  • 2
6 Comments
 
LVL 41

Accepted Solution

by:
footech earned 1000 total points
ID: 40293560
The scripts are functions.  You will need to run
.\Get-BadPasswordInfo.ps1
.\Get-AccountLockout.ps1

The above creates the functions so you can use them.  Then you have to run
Get-AccountLockout -Account "someusername"

Pretty much the entire script would have to be modified to support your 10 DCs.  It's hard-coded to only handle three, and even the third is commented out in places.  The script should probably be re-written to query for all domain controllers, and then dynamically handle all of them.
0
 

Author Comment

by:Jerry Seinfield
ID: 40293751
Thanks fotech,

Could you please re-writte the script and enter 10 generic DCs names?

Perhaps something like below

MIADC001
MIADC002
NYCDC001
NYCDC002
.......
0
 

Author Comment

by:Jerry Seinfield
ID: 40295855
Can I please get an update ?
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 

Author Comment

by:Jerry Seinfield
ID: 40296984
Good Morning Footech

How is the script going so far?

Have you had a chance to modify the script and add new updates?
0
 
LVL 41

Expert Comment

by:footech
ID: 40297395
Frankly that goes against what I believe the purpose of the PowerShell topic area should be.  It should be for helping others with specific questions about PowerShell, understanding nuances, suggestions for optimization, assistance when stuck on how to code for a particular problem, etc.; and not for providing complete scripts for people (or as I like to call it, a "free scripting service").  I'll admit that that line is crossed from time to time, but I try to avoid it.

The Get-AccountLockout script relies on another, which relies on two others.  It's a mess and I don't think I have want to devote all the time to clean it all up.  If you want to attempt it yourself and get stuck at specific points, feel free to open new questions.  Best of luck.
0
 

Author Closing Comment

by:Jerry Seinfield
ID: 40299989
no comments
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦
Screencast - Getting to Know the Pipeline

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question