Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Help needed for password reset in AD via bat file

Jun 22, 2012 8:31PM PDT

Hi

OK I will start by giving you the scenario

We have a call centre with Team leaders and management, and then call centre staff.

I have created the following script as per below and
this works OK.


@echo off

SET /P usr=Please type the username you wish to reset:
net user %usr% * /domain /Active:yes


pause


However I need this so people can search names within AD rather than having to get the username correct.

ie, at the moment the person has to type jsmith, I want to be able to do john smith then it finds the user to reset the password.

Please email back.

Discussion is locked