• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 97
  • Last Modified:

What's the PowerShell syntax to change a mailbox name in Office 365?

I have an Office 365 Business Premium user who somehow ended up with the name "Office" and alias of "Jane". It might have happened when the accounts were first provisioned a few years ago and the name Office was one of her aliases since she was the office manager.

Now, however, we'd like to have a shared mailbox called Office that more than one person can manage and receive messages in. Trying to use the GUI to create the shared mailbox gives the error that the name is already in use. When I ran the "Get-mailbox" command, I found that Jane was actually listed as the alias value for the name "Office" instead of the other way around. I've gone through the additional email addresses and made sure Office@company.com was not assigned to her any more, but the Name appears to be a value I can't change from the GUI.

My problem is trying to figure out the "Set-mailbox" command I need to run to change Office to Jane. I imagine it's a pretty simple command, but I'm not experienced enough with PS to untangle the syntax. How do I change mailbox name "Office" to "Jane"?

Your help is greatly appreciated!
Shannon Mollenhauer
Shannon Mollenhauer
  • 3
1 Solution
timgreen7077Exchange EngineerCommented:
Why not just log into o365 and change it? Log into O365 and open the exchange admin center. Click recipients > mailboxes, select the mailbox you want to edit the alias on and click the pencil icon to edit it. A new window will open and the first option tab is 'general' and its there you will see the user information along with the alias that you can change. you can do this for the user mailbox and the shared mailbox.
Aaron GuilmetteTechnology Solutions ProfessionalCommented:
If the current mailbox's alias is Jane and you want to change it to Office, from PowerShell connected to Exchange Online:

Set-Mailbox -Identity Jane -Alias Office
Shannon MollenhauerAuthor Commented:
As I stated in the original post, I can't make this kind of change from the GUI in Exchange admin center.

I have to perform some kind of command that says "change the name of mailbox 'office' to 'jane' " because the GUI is showing the user's real name, "Jane Doe" in the display name and her email address as "Jane@company.com" (along with some others, like jdoe@company.com). When I run the Get-Mailbox command, I get a list of Name and Alias values which include 'office' for the name and 'jane' as the alias. Other users have a name like BSmith and alias Bob. Her name should NOT be Office - HOW DO I CHANGE HER MAILBOX NAME IN POWERSHELL?
Shannon MollenhauerAuthor Commented:
Someone on Spiceworks gave me the right answer:
I ran "set-user -identity office -name jane" and was able to change it. Then I could use the GUI to create the shared mailbox.
Shannon MollenhauerAuthor Commented:
Turns out the command was Set-User to change the user name.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now