We help IT Professionals succeed at work.

Powershell to Expire Groups of people

John Davies
John Davies asked
Last Modified: 2019-09-27
Password expiration by groups of Username.

What I am looking for is a powershell script or help with one that I can run and expire a group of people from a csv file. So for example

People with the surname beginning with A to E then F to I and so on......

I would populate the spreasheet but just need to expire people passwords in groups rather than expiring everyone in one hit. The reason i am wanting this I am implementing a new password policy and as we have over 2500 users I would rather expire them and have them change the password on next login in chunks on a weekely basis.


Watch Question

Top-Rated Plus Freelancer (Upwork)/EE Solution Guide / CEO / Photographer
Awarded 2018
Distinguished Expert 2018
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)


Sorry Jose, forgot to mention that this is a pure cloud office 365 solution, no on prem or hybrid.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions