- Microsoft Office 365 Administration Cookbook
- Nate Chamberlain
- 221字
- 2021-03-27 00:38:27
Changing a user password
While it is typically best to allow a user to set their own password, there are times where an admin needs to take over and set a user's password on their behalf (for example, service accounts, terminated users, or a new user who is struggling to get their password properly set).
While it is a typical best practice to have a user immediately change their password once set, this recipe focuses on the admin setting the password and not forcing the user to reset the password upon the next login.
Getting ready
Using the skills learned in the Setting up the PowerShell environment recipe from Chapter 1, Office 365 Setup and Basic Administration, connect to your Office 365 tenant via PowerShell.
How to do it…
Enter the following command into your PowerShell or ISE window to change the password of a specific Office 365 user:
Set-MsOlUserPassword –UserPrincipalName "bertha@natechamberlain.com" –NewPassword "Password1" –ForceChangePassword $false
Should an admin wish to require a user to change the password upon next login, simply change the ForceChangePassword parameter's value of $false to $true.
How it works…
Instead of logging in to the Office 365 Admin center, an admin can quickly set a password through PowerShell and require whether a user resets that password upon next login or not.
- FreeSWITCH 1.6 Cookbook
- 物聯(lián)網(wǎng)系統(tǒng)開發(fā):從0到1構(gòu)建IoT平臺(第2版)
- 高級C/C++編譯技術(shù)(典藏版)
- 零基礎(chǔ)學(xué)單片機(jī)C語言程序設(shè)計
- Oracle從入門到精通(第5版)
- Java EE核心技術(shù)與應(yīng)用
- 零基礎(chǔ)Java學(xué)習(xí)筆記
- MySQL從入門到精通(軟件開發(fā)視頻大講堂)
- 快速入門與進(jìn)階:Creo 4·0全實例精講
- Oracle Data Guard 11gR2 Administration Beginner's Guide
- Qt 4開發(fā)實踐
- jQuery從入門到精通(微課精編版)
- ArcPy and ArcGIS(Second Edition)
- Java EE輕量級解決方案:S2SH
- Hadoop Blueprints