?
Solved

powershell script to enable Unified Messaging

Posted on 2012-09-06
1
Medium Priority
?
3,444 Views
Last Modified: 2012-09-06
Hi all,

I am trying to automate the process of enabling mailboxes for UM.  I have the following line but it doesn't work.

Basically, I have a csv file with the following headings:
uname extensions mailboxpolicy secondarydialplan

The script should import the csv file, Enable UM and add secondary dialplan:

HEre's the script

$users=import-csv ".\umusers.csv"

foreach ($user in $users)
      {get-mailbox -identity $_.uname

      enable-UMMailbox -identity $_.uname -umMailboxpolicy $_.mailboxpolicy -Extensions $_.extensions
      set-mailbox $_.uname -secondaryaddress $_.extensions -secondarydialplan $_.secondarydialplan
}

Any idea what I am doing wrong?

Thanks
0
Comment
Question by:annayeg
1 Comment
 
LVL 23

Accepted Solution

by:
Stelian Stan earned 2000 total points
ID: 38373234
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Loops Section Overview
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question