Wednesday, July 15, 2015

Change Password for all users

Import-Csv C:path\filename.csv|foreach{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName -NewPassword “Enter Requied pwd” -ForceChangePassword $true}

 Force Change Password: 
If you want make user to change password in first logon and it is optional

$true: force user to change password

 $false: Not force user to change password

Enter Required Password:

You need to enter required password to set for all users. Example: password

No comments:

Post a Comment