Active Directory Migrations: Unified Messaging

This next one is pretty straightforward. We’re just creating a remote session to Exchange and then enabling Unified Messaging with the appropriate settings. Again, this is where our import file is super important as it has to have all the relevant information in it.

##call include file
. .\params.ps1
##Create our Exchange session. Exchange can be finicky about this.
$ExchSession=New-PSSession -ConfigurationName Microsoft.Exchange -connectionuri $ExchURI -credential $LocalCredentials

$import=import-csv $importfile

## enable UM
## Import the sessions and then go thru the import file
## Check if the user has an extension, if so they need to be enabled
import-pssession $ExchSession|out-null
foreach ($item in $Import){
  if ($item.extensions){
    enable-ummailbox -identity $item.displayname -extensions $item.extensions -ummailboxpolicy $item.umpolicy -sipresourceidentifier $item.smtp
write-host "Enabling UM for: " $item.displayname -foregroundcolor yellow
## Seems like a great time to update all of our address lists
get-addresslist|update-addresslist

##clean up after ourselves
remove-pssession $Exchsession
Advertisements

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