Wednesday, September 12, 2018

Manage cloud identities with Windows using PowerShell


Changing Password
Set-MsolUserPassword –UserPrincipalName siddiq.ali@mycompany.onmicrosoft.com –NewPassword Pa$$w0rd –ForceChangePassword $true


Importing bulk users in Office 365 using Powershell
$NewUsers = Import-Csv –path .\NewUsers.csv


Applying Strong Password to the users
Set-MsolUser –UserPrincipalName siddiq.ali@mycompany.onmicrosoft.com
–StrongPasswordRequired $true

Powershell to set password to get never expires
Get-MsolUser | Set-MsolUser –PasswordNeverExpires $true

Configure password expiration

Set-MsolUser –UserPrincipalName siddiqali.mohammad@mycompany.onmicrosoft.com
–PasswordNeverExpires $true