Whenever I run a script to reset user passwords in AD it works great. When I run powershell I type reset-userpwd, and then i am asked to type in part or all of the users last name. After I type in the last name (or part of the last name) I choose from a list of users that meet the criteria and the password is automatically reset. However there is a weird instance when say I’m resetting the user with last name “Babb” and they are the only Babb in AD I am given the error “Babb: the term ‘babb’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 +Babb + ~~~~ + Category info :object not found: (Babb: string) , commandnotfoundexpection +FullyqualifiederrorID : commandfoundexception
However if I just type in “ba” it will bring up a list of all users with ba in their last name.
I hope I explained this well.