[email protected] 859-363-6997

Force change passwords group of users Office 365 [MCS365]

0 Comments

Hi everyone,

I need to force a group of users to change their passwords on Office 365. The thing is that i know i have to do it with powershell. I found that very good post done by MVP Vasil Michef.

https://www.michev.info/Blog/Post/1419/force-password-change-for-all-users-in-office-365

The fact is I want to do it for a group of users and not for all. For exemple for members of the REPASS security group.

My idea was use this command:

Get-MsolUser -All | ? {$_.Country -eq “USA”} | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true

And change the bold part for the corresponding but i don’t know if this is possible.

After that, i only need to Revoke the sessions of the users to force the change of password: Revoke-SPOUserSession

Please if i’m wrong, correct me.

Regards and thanks.

submitted by /u/marbblek
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *