Get the App
SLTechnology News&Howtos  ›  Network Security  › 

O365 batch reset user password

Shulou Source: shulou.com Published: 2022-06-01 05:20:38 10月04日 Update

After O365 creates a large number of users, it needs to reset user passwords in batches, but only a small number of users can be reset at a time through the console. If there are thousands of users, it will be very inefficient. At this time, you need to use the powershell of O365 to reset in batches.

First you need to download the powershell o365 support module:

Microsoft Online Services Login Assistant, download link below:

http://www.microsoft.com/zh-cn/download/details.aspx? id=41950

Microsoft Azure Active Directory module, download link below:

http://go.microsoft.com/fwlink/p/? linkid=236297

1. Run powershell as administrator

2. Enter import-moudle MSOnline to import O365 module, run Get-Module to see MSOnline has been imported.

3. Enter Connect-MsolService to log in to O365.

4. After logging in, enter Get-MsolUser to view user information in the cloud.

5. Reset the user password as follows. You can choose to reset it in batches from departments or regions according to your needs. The commands are as follows:

Get-MsolUser -State X | Set-MsolUserPassword -NewPassword "p@ssw0rd"

Tags: User module input password link login run low next thousands information assistant command region console efficiency administrator identity department requirements Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft Shulou Tech Info NVidia OPPO Reno