Index

» Home

» 

» OCS Deployment

» Front End Server

» Edge Server

» Web Conferencing Server

» Archiving Server

» Certificates

» Communicator Web Access

» A/V Server

» VOIP 'N' Mediation

» Group Chat Server

» Migration

» Exchange UM

» OCS Issues

» OCS Disaster Recovery

» Miscellaneous

 

How to use the script OcsConfigureTelUri.wsf?

How to use the script "OcsConfigureTelUri.wsf"?

In the following script you need to change only parameter defined in arrComputers = Array("OCSdc"). OCSdc is the domain controller netbios name in my lab. Change it as per your environment. It can be netbios name of any one of the domain controllers which is up and running.

If you are running this script on a Domain Controller then just put a “.” as arrComputers = Array(".").

Save the following script as SIPExport.vbs under any directory. Suppose the directory you saved this file is c:\script.

================================================================

On Error Resume Next

arrComputers = Array("OCSdc")

For Each strComputer In arrComputers

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

Set colItems = objWMIService.ExecQuery("SELECT * FROM

MSFT_SIPESUserSetting","WQL",wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems

WScript.Echo objItem.PrimaryURI

Next

Next

================================================================

Now access c:\script through command prompt. And type following command.

Cscript SIPExport.vbs >UsersSIP.txt

Running the above command will produce a text file UsersSIP.txt which will have SIP URI of all of the users enabled for SIP. Open this file and remove the following lines from it...

"Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved."

Copy UsersSIP.txt into the folder “WMI samples” (C:\Program Files\Microsoft Office Communications Server 2007\ResKit\WMI Samples).

Access the WMI samples directory from your command prompt and run the following command.

cscript ocsconfigureteluri.wsf /sipurisfile:UsersSIP.txt phonenumberpatternsfile:phonenumberpatterns.xml

This will take the phone number field from a user account and convert it to the proper format and populate the Line URI field on any clients that are voice enabled in OCS.

Note: Ensure that you do have MSXML 4.0 installed before you run above command. You can download it from here.

 
OCS Made Easy!
 

 

Copyright, OCSpedia.com. Microsoft, MS-DOS, Windows, Windows 2000, Windows XP, Windows Server 2003, Windows NT, Windows 98, Windows 95 are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and other countries. All other names are registered trademarks of their respective companies. Should any right be ran afoul, it is totally unintentional. Send us an e-mail and we will promptly and gladly rectify it. All external sites will open in a new browser. Ocspedia.com does not endorse external sites and is not responsible for their content. For broken links, site problems or any feedback - please send an email at uc@ocspedia.com.