Enable users for Lync from multiple OUs

This script queries one or multiple OU's to check for userobject that aren't enabled for Lync yet.Userobjects that don't have an emailaddress or that are disabled will be ignored. The script uses the emailaddress as the sipaddress, but is easily modified to use a different type o

867 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • Change the "send an email to notify" section to send welcome email from Lync template
    2 Posts | Last post November 17, 2015
    • Hi there. This script is great. One thing i'm trying to incorporate is to modify the "send an email to notify" section of your script to use the Lync Set-CsPinSendCAWelcomeMail powershell script (see link below) to send a welcome email to these newly enabled Lync users. 
      In the Lync Set-CsPinSendCAWelcomeMail script, in the beginning of the script, there's a variable called $UserUri which I believe is looking for the SipAddress of the enabled user. From your script, I assume the $OUUsers array contains this SipAddress field, which I would then parse into the Lync Set-CsPinSendCAWelcomeMail script (into the $UserUri variable). The only trouble is, I have no idea how to get the SipAddress field from your $OUUsers array, into the $UserUri variable. Any assistance or guidance would be greatly appreciated. Thanks.
    • Hi,
      it has been a while since i've created and used this script. But I'll try to help you: $OUUsers contains all users with an emailaddress, but without a SIPAddress. However, if you use the emailaddress as the sipaddress, you could use the $_.WindowsEmailAddress in $OUUsers to set the $UersUri