Bulk password reset?

Hi guys

Looking for help in getting something done in Powershell.

So I've taken the quick hit and can get a list of user-ids based on membership of a specific group that is exported into a CSV file. How can I then expand on this further to use that list of IDs to reset the passwords for all of those users? I'm guessing have a separate .JSON file that contains the password I want to use for all of them, and I need some type of ForEach syntax to step through that user-id list. But how?

For now what I've done is run a query to get all user ids for members of a particular group and have that exported to a CSV. I then take that CSV and basically convert it into a batch file that contains the gc function to create the new password, including the name of the single json file that has the new password for all users. So essentially it ends up being a very long batch file with one line per user. Takes a couple of minutes to setup the file but it works. Hopefully there's a much better way of doing it.

HI Vaun,

The CLI is designed to be a swiss army knife. The solution is not elegant, but functional :). If you are trying to build a re-occurring scheduled job there is probably some betters way to do this, but it sounds like you used the CLI for one of the use cases it was designed for. Let me give some thought to this and see if there is a different approach.

Thanks,
John Carnell
Manager, Developer Engagement

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.