To connect to Auth Contect:
If you want to change the setting for all the users in an organization, run the following command:
To see all users and their “Password never expires setting”, you can run the following PowerShell command:
Code:
Connect-MsolService
Code:
Command:Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
Code:
Command:Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires