Need to Bulk Convert Shared Mailboxes in office 365

i try the below but it didn't work

$ConvertToShared = import-csv c:\Mailboxes-ConvertToShared.csv Foreach ($User in $ConvertToShared) {set-o365mailbox -Identity $user.PrimarySMTPAddress -Type Shared}
Jorge OcampoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
Can you try this way...
$ConvertToShared = import-csv "c:\Mailboxes-ConvertToShared.csv"
ForEach ($User in $ConvertToShared) {
set-o365mailbox -Identity $user.PrimarySMTPAddress -Type Shared

Open in new window

Jorge OcampoAuthor Commented:
i place that on powershell exactly like it is
Jorge OcampoAuthor Commented:
any one with ideas?
Will SzymkowskiSenior Solution ArchitectCommented:
i place that on powershell exactly like it is

you need to copy this to a text file and then save it as .PS1 file extension. Once you have done this open the ESM, navigate to the file location and type .\name.sp1. This will run the script.

If you get an error saying it cannot be run, you will need to ensure that your Execution Policy is properly set to run scripts.

Set-ExecutionPolicy RemoteSigned


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Office 365

From novice to tech pro — start learning today.