Skip to content
DnsLister Forum

Where domain hunters compare notes

Can it be done easily? Script to remove a list of users from a group.

Hello,

I have a bunch of people that left the company. We have a script to convert their mailbox to shared.

We have a script to remove their office licenses.

The only issue is many of them are AD synced and a group they are in automatically gives them a 365 standard license the sync overrides their assigned licenses so I need to remove them from that ad group.

I could remove them all individually from that group but I thought I'd see if there was an easy way with a script since I love learning new stuff (but suck at powershell)

https://preview.redd.it/fwkc8vhe5qth1.png?width=297&format=png&auto=webp&s=15492a33e3b7c7f5e9f859503c540f6e7c3ec72f

Source: r/activedirectory · by /u/Deep-Egg-6167

Leave a Reply

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