Avatar of rivkamak
rivkamakFlag for United States of America asked on

How to convert 365 mailbox to shared and remove the license in bulk?

Hi,


Could someone give me a simple script for converting 365 mailboxes in bulk to shared? It would be great if the script could also include removing that users 365 license as well.

Thank you.

Microsoft 365Powershell

Avatar of undefined
Last Comment
rivkamak

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vasil Michev (MVP)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
rivkamak

Thank you. I did the first part but when I save your remove licensec code and run as a powershell, it runs  and does not have a verbose output and doesnt change licenses. What am I doing wrong?
Vasil Michev (MVP)

It expects the CSV file to have a column named UserPrincipalName, make sure to change it accordingly. As for the verbose output, if depends on how you run it, but you can just set

$VerbosePreference = "Continue"

Open in new window

ASKER
rivkamak

I got the verbose output and it says "processing for user x" but still not removing the licenses.
My csv file has one column on it,    
UserPrincipalName
1user@bob.org
2user@bob.org

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Vasil Michev (MVP)

Does it show any other output? If it just skips to the next user, it means it wasn't able to find a matching object. You are connected via the MSOnline module, right?
ASKER
rivkamak

Sorry, I was connecting to exchange online via powershell. How do you use the MSOnline module?I use Azure AD powershell for Graph?
SOLUTION
Vasil Michev (MVP)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
rivkamak

Thank you that worked.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.