Lync 小技巧-39-批量-設定-AD-分機-手機-啟用-Lync-設定-Lync-分機

來源:互聯網
上載者:User

標籤:lync 小技巧;批量-設定-ad-分機-手機-啟用-lync-設定-lync-分機

 環境:

1. 有AD使用者,但是沒分機號

2. 有Lync Server 2013環境,但是大量使用者沒有啟用,沒有設定分機號

3. 批量完成任務

目的:

1. 記錄過程

2. 方便後續使用

過程:

1. 建立使用者

650) this.width=650;" height="316" 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="316" 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="316" title="clip_image010" style="border:0px;" alt="clip_image010" src="http://img1.51cto.com/attachment/201409/28/711418_1411919481zl1z.jpg" border="0" />

2. 查詢-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. 查看-指令碼

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 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 30 for Lync changes

#為Lync改變暫停30

write-host -foregroundcolor Green "Pausing 30 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 30 for Lync changes

#為Lync改變暫停

}

4. 運行

選擇-右鍵-使用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="200" 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. 查詢

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. 總結

從上面可以看出,增加AD的分機和手機屬性可以,其它你要增加其它屬性也是可以的。

但如果你環境再有Exchange Server 2013是否能這樣將郵箱也啟用起來,就要你自己去玩了。

不帶你玩了,有空大家測試了反饋回來。

本文出自 “IT-Standardization” 部落格,請務必保留此出處http://dynamic.blog.51cto.com/711418/1559207

Lync 小技巧-39-批量-設定-AD-分機-手機-啟用-Lync-設定-Lync-分機

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.