Pages

Thursday, December 16, 2010

PowerShell commands/cmdlet to script the process of assigning an EUM attribute for users

As easy as it is to assign an EUM attribute to a user who is not enabled for Unified Messaging through the Management Console GUI, this method isn’t too practical when you have to enable more than 50 people. So while going through a folder with my old notes for a client where we had to assign over 100 users an EUM attribute because they were not UM enabled, I noticed that I had created a spreadsheet for a script to automate the process. Since I don’t recall writing a post with this, I figure I’d do it so I can reference it for future projects in case I end up losing the spreadsheet.

The way I approached this last year was to create a spreadsheet that generated the following commands:

$mbx = Get-Mailbox userAlias

$mbx.EmailAddresses +="eum:999;phone-context=DialPlanName.domain.com"

$mbx set-mailbox

**The value “999” is an example of an extension.

***I’ve highlighted all the fields that you will need to change in red.

The following is an explanation of what was done for the lines:

$mbx = Get-Mailbox userAlias

Concatenate $mbx = Get-Mailbox with the user’s alias which you can retrieve using LDIFDE or CSVDE.

$mbx.EmailAddresses +="eum:999;phone-context=DialPlanName.domain.com"

Concatenate $mbx.EmailAddress +-="eum: with the user’s extension then concatenate ;phone-context= with your dial plan name with the domain’s FQDN.

$mbx set-mailbox

The line above is just to pipe all the information into the set-mailbox command so no changes are required. Once you’ve created a full list for all the users, you can either just copy and paste the commands into PowerShell or create a ps1 file to execute.

No comments: