Quickly update your mailboxes with an a single attribute

A customer asked me today if there is a quick way to modify an attribute across all of their mailboxes with the same value.  The attribute in question was PostalCode.

There are a several different ways to do this… probably the best way is to use the CSV Parser script with a csv file containing the updates… that way you will have a record of what was done.

But… having said that, it is possible to quickly fire through all of your users with a simple piped cmdlet.

example:

get-user | set-user -PostalCode "92345"

This will get all users, and one at a time pipe them through the set-user cmdlet, setting whatever you specify.

Use get-help to see what the available options are for the cmdlets.

Don’t forget that not all attributes are available for a user through set-user.  There is also set-CASMailbox and set-mailbox to explore and try.

Jonny

Advertisements

4 Responses to Quickly update your mailboxes with an a single attribute

  1. Mike says:

    Where can we get a list of all the attributes for the users that can be set by this set-user command?

  2. US LiveAtedu says:

    in powershell, you can type:get-help set-userthen there is technet… most of the cmdlets work: http://technet.microsoft.com/en-us/library/aa998221.aspx

  3. William.Tait says:

    Why doesn’t the set-mailbox cmdlet not work when updating the “Department” mailbox attribute? You must use Set-User cmdlet. Then you must use Set-Mailbox cmdlet when updating the WindowLiveID attribute and not use Set-User. This is confusing.

    • set-mailbox is for the mailbox specific attributes, as opposed to user specific. Underlying the Outlook Live (Exchange) mailbox, we have an active directory account supporting it (albeit disabled). This is where the user specific attributes, like department, are stored.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: