Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

How to set password to 'never expire' for all users in a special domain with Set-MsolPasswordPolicy?

$
0
0

I know If I want to set a user's password to never expire do

          Set-MsolUser -UserPrincipalName 
user@contoso.com -PasswordNeverExpires $true

If want to do it for all users do

          Get-MsolUser | Set-MsolUser -PasswordNeverExpires
$true

Is that a way to set 'never expire' for all users withSet-MsolPasswordPolicy?

if yes, how many days should I assign to -ValidityPeriod?

if not, is there another Powershell command to do the thing?  Thanks in advance.


Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>