Avatar of adamtrask
adamtrask
 asked on

Using a power shell batch file to disable a user in Active directory

Hi,

I need help creating a power shell batch file that would disable a user in Active directory.
Of course the file needs to prompt for the ADUser name and then proceed to disable him/her.

It would be a bonus if the file could also include code to move the newly disabled AD user to a folder called OldUsers.

Thanks
Active DirectoryPowershell

Avatar of undefined
Last Comment
adamtrask

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Will Szymkowski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

no points: oBda -- like your solution!
adamtrask

ASKER
Thank you very much.... oBda -- I need to spend some time studying your solution. Thank you.
Your help has saved me hundreds of hours of internet surfing.
fblack61