We help IT Professionals succeed at work.

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}
Comment
Watch Question

Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
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


Will.

Author

Commented:
i place that on powershell exactly like it is

Author

Commented:
any one with ideas?
Senior Solution Architect
Most Valuable Expert 2015
Top Expert 2015
Commented:
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

Will.