locked account users, powershell review

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
Jerry SeinfieldAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

footechCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jerry SeinfieldAuthor Commented:
Thanks fotech,

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

Perhaps something like below

MIADC001
MIADC002
NYCDC001
NYCDC002
.......
0
Jerry SeinfieldAuthor Commented:
Can I please get an update ?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Jerry SeinfieldAuthor Commented:
Good Morning Footech

How is the script going so far?

Have you had a chance to modify the script and add new updates?
0
footechCommented:
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
Jerry SeinfieldAuthor Commented:
no comments
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.