Lync Tips -39-Batch-set-ad-extension-phone-enable-lync-settings-lync-extension

Source: Internet
Author: User
Tags samaccountname

Environment:

1 An ad user, but no extension number

2. There is a Lync Server 2013 environment, but a large number of users are not enabled, no extension number is set

3. Batch Complete Tasks

Objective:

1. Recording process

2. Convenient for subsequent use

Process:

1. Create a new user

650) this.width=650; "height=" "title=" clip_image002 "style=" border:0px; "alt=" clip_image002 "src="/HTTP/ Img1.51cto.com/attachment/201409/28/711418_1411919478soxd.jpg "border=" 0 "/>

650) this.width=650; "height=" "title=" clip_image004 "style=" border:0px; "alt=" clip_image004 "src="/HTTP/ Img1.51cto.com/attachment/201409/28/711418_14119194780nym.jpg "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image005 "style=" border:0px; "alt=" clip_image005 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_14119194794vjy.png "border=" 0 "/>

LyncDemo081

650) this.width=650; "height=" 484 "title=" clip_image006 "style=" border:0px; "alt=" clip_image006 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919479vko1.png "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image007 "style=" border:0px; "alt=" clip_image007 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919480j3fh.png "border=" 0 "/>

Aa123456

650) this.width=650; "height=" 484 "title=" clip_image008 "style=" border:0px; "alt=" clip_image008 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919480lw7l.png "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image008[1] "style=" border:0px; "alt=" clip_image008[1] "src=" http:// Img1.51cto.com/attachment/201409/28/711418_14119194809tzh.png "border=" 0 "/>

650) this.width=650; "height=" "title=" clip_image010 "style=" border:0px; "alt=" clip_image010 "src="/HTTP/ Img1.51cto.com/attachment/201409/28/711418_1411919481zl1z.jpg "border=" 0 "/>

2. Query-lync

650) this.width=650; "height=" 468 "title=" clip_image012 "style=" border:0px; "alt=" clip_image012 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919481nbjg.jpg "border=" 0 "/>

3. View-Script

650) this.width=650; "height=" 281 "title=" clip_image014 "style=" border:0px; "alt=" clip_image014 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_14119194827d10.jpg "border=" 0 "/>

650) this.width=650; "height=" 183 "title=" clip_image015 "style=" border:0px; "alt=" clip_image015 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919482hbmw.png "border=" 0 "/>

Empno,phonenumber,mobilenumber

lyncdemo081,8081,13811111111

650) this.width=650; "height=" 329 "title=" clip_image017 "style=" border:0px; "alt=" clip_image017 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919482sawp.jpg "border=" 0 "/>

#设置CSV文件的位置

$users =get-content ' D:\Set-ADUser-Number-Enable-CSUser-i-x-Cloud.csv '

$gdate = (get-date-uformat "%y-%m-%d")

#设置Lync Pool name for Server 2013

$poolname = "Lyncpool01.i-x-cloud.com"

Foreach ($empno in $users) {

Write-output $empno;

$empnovalue = $empno-split ","

$empno = $empnovalue [00]

$phonenumber = $empnovalue [01]

$mobilenumber = $empnovalue [02]

#设置AD中的让手机

Get-aduser-filter {samaccountname-eq $empno}-properties Officephone | Set-aduser-officephone + $phonenumber-mobilephone $mobilenumber

Get-aduser-filter {samaccountname-eq $empno}-properties Officephone

#启用Lync

Get-csaduser-ldapfilter samaccountname= $empno | Enable-csuser-registrarpool $poolname-sipaddresstype Userprincipalname-sipdomain i-x-cloud.com

Pause for Lync changes

#为Lync改变暂停30

Write-host-foregroundcolor Green "Pausing Seconds for Lync changes"

Start-sleep-s 30

#设置企业语音Lync分机

Get-csaduser-ldapfilter samaccountname= $empno | set-csuser-enterprisevoiceenabled $True-lineuri tel:+ $phonenumber

Get-csaduser-ldapfilter samaccountname= $empno

Pause for Lync changes

#为Lync改变暂停

}

4. Running

Select-Right-run with PowerShell

650) this.width=650; "height=" 242 "title=" clip_image019 "style=" border:0px; "alt=" clip_image019 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919483wozv.jpg "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image020 "style=" border:0px; "alt=" clip_image020 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919483usat.png "border=" 0 "/>

650) this.width=650; "height=" 192 "title=" clip_image022 "style=" border:0px; "alt=" clip_image022 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919483uamj.jpg "border=" 0 "/>

650) this.width=650; "height=", "title=" clip_image024 "style=" border:0px; "alt=" clip_image024 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919484sklq.jpg "border=" 0 "/>

650) this.width=650; "height=" 274 "title=" clip_image026 "style=" border:0px; "alt=" clip_image026 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919484hq3p.jpg "border=" 0 "/>

650) this.width=650; "height=" 365 "title=" clip_image028 "style=" border:0px; "alt=" clip_image028 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_14119194855fmh.jpg "border=" 0 "/>

5. Enquiry

650) this.width=650; "height=" 484 "title=" clip_image029 "style=" border:0px; "alt=" clip_image029 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919485ptem.png "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image030 "style=" border:0px; "alt=" clip_image030 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919486sq3p.png "border=" 0 "/>

650) this.width=650; "height=" 468 "title=" clip_image032 "style=" border:0px; "alt=" clip_image032 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919486b2ko.jpg "border=" 0 "/>

650) this.width=650; "height=" 468 "title=" clip_image034 "style=" border:0px; "alt=" clip_image034 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919487rt2x.jpg "border=" 0 "/>

650) this.width=650; "height=" 484 "title=" clip_image035 "style=" border:0px; "alt=" clip_image035 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_14119194870gsy.png "border=" 0 "/>

650) this.width=650; "height=" 459 "title=" clip_image036 "style=" border:0px; "alt=" clip_image036 "src=" http:/ Img1.51cto.com/attachment/201409/28/711418_1411919487mf3t.png "border=" 0 "/>

6. Summary

As you can see from the above, it is possible to increase the ad's extension and cell phone properties, and you can add other attributes as well.

But if you have an environment where Exchange Server 2013 will be able to enable the mailbox, you'll have to play it yourself.

Do not take you to play, have time to test the feedback back.

This article is from the "it-standardization" blog, make sure to keep this source http://dynamic.blog.51cto.com/711418/1559207

Lync Tips -39-Batch-set-ad-extension-phone-enable-lync-settings-lync-extension

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.