30 October 2013

Automatically enable users in a particular OU for Lync 2010

I was trying to get Forefront Identity Management to provision a new user and enable Lync for this user through provisioning code.
Turns out this is a not supported feature, and can only be done through codeless provisioning.

A way to to do this is by running a script on the lync server (frontend).
This script searches for all users in a specific OU and checks if the value "enabled" is set to true.
If not (blank) then according to the email address the users gets enabled for lync and set to the correct pool.

The script:

import-module 'C:\Program Files\Common Files\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1'
get-csaduser -filter {Enabled -ne $True} -OU "ou=Employees,dc=domain,dc=lan" | Enable-CsUser -RegistrarPool lyncpool.domain.lan -SipAddressType EmailAddress



Source

No comments:

Post a Comment