How does it work?
The script queries Exchange for existing Auto-Attendant and Dial Plan pilot numbers. It then searches Active Directory for objects that have a matching Line URI (msRTCSIP-Line). If a match is not found, the contact object will be created.
Instructions
- Download Create-LyncUMContactObjects.ps1 from here
- Review prerequisites and usage examples below
- Run the script
- After the script has run you can check OcsUmUtil.exe to make sure the contacts have been created successfully or just run live test
Usage
Create-LyncUMContactObjects -Domain <Domain FQDN> -SIPDomain <SIP Domain> -RegistrarPool <Pool FQDN> -ExchangeServer <FQDN> -OU <OU for contact objects> -SleepTime <optional: Seconds> -CreateAA <optional: $TRUE|$false> -CreateSA <optional: $TRUE|$false>
Parameters
-Domain <Domain FQDN> : Domain FQDN
-SIPDomain <SIP Domain> : SIP domain for contact objects
-RegistrarPool <Pool FQDN> : Lync pool
-ExchangeServer <FQDN> : Exchange server to connect to for PowerShell commands
-OU <Distinguished Name> : OU to create contact objects in
-SleepTime <optional: Seconds> : Delay between contact creation and update of additional properties
-CreateAA <optional: $TRUE|$false> : Create contact objects for Auto-Attendants
-CreateSA <optional: $TRUE|$false> : Create contact objects for Subscriber Access numbers
Example
Create-LyncUMContactObjects -Domain "domain.local" -SIPDomain "sipdomain.co.nz" -RegistrarPool "lyncpool.sipdomain.co.nz" -ExchangeServer <exchange.domain.local> -OU "OU=LyncContactObjects,DC=domain,DC=local" -SleepTime "10" -CreateAA $true-CreateSA $true
Prerequisites
- Lync 2013 and Exchange 2013 (currently untested on 2010)
- PowerShell 3.0
- User account which is a member of CSAdministrator and Exchange Admins (lesser permissions are possible but not tested)
- PowerShell may need to be "Run As Administrator"
Any feedback, questions or feature requests please feel free to get in touch.

No comments:
Post a Comment