Saving OCS User Settings Before a Lync Migration

During an OCS to Lync migration, existing OCS user settings, including user policies, are transitioned to Lync when the OCS pool is merged into the Lync deployment and OCS users are migrated from their home OCS pool to the Lync pool.

In many cases it is helpful to ensure that this transition was done properly and users have equivalent Lync functionality to what they had in OCS after the migration. But how do you verify this once the users have already been migrated over?

Answer: do a quick backup of your OCS user settings before you migrate your users. This gives you the ability to make sure that a user who was enabled for Public Instant Messaging for example (aka PIC) is also enabled for PIC after the user account has been migrated to Lync.

Below is small VBScript that you can customize to backup the existing OCS user settings. The script enumerates through all OCS enabled users and makes use of the OCS WMI MSFT_SIPESUserSetting class to access their current OCS settings, and outputs it to a file called called OCSUsers.txt:

Set objFSO = CreateObject(”Scripting.FileSystemObject”)
Set objFile = objFSO.CreateTextFile(”OCSusers.txt”, True)

objFile.WriteLine “Starting…”

strComputer = “.”

Set objWMIService = GetObject(”winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)

Set colSoftware = objWMIService.ExecQuery(”select * from MSFT_SIPESUserSetting”)

For Each objItem in colSoftware
objFile.WriteLine “OCS User Name: ” & objItem.DisplayName
objFile.WriteLine “PrimaryURI: ” & objItem.primaryURI
objFile.WriteLine “Enabled for Enhanced Presence: “  & objItem.EnabledForEnhancedPresence
objFile.WriteLine “Remote Access: “  & objItem.EnabledForInternetAccess
objFile.WriteLine “Federation: “  & objItem.EnabledForFederation
objFile.WriteLine “Public IM: “  & objItem.PublicNetworkEnabled

objFile.WriteLine “Location Profile: “  & objItem.LocationProfile
objFile.WriteLine “Meeting Policy: “  & objItem.MeetingPolicy

objFile.WriteLine “—————————————————-”

Customize the script to include whatever OCS user settings are important in your environment by adding a objFile.WriteLine line with an OCS user property from the WMI MSFT_SIPESUserSetting class. All the user properties are available here:

Save the above script to a *.vbs file (e.g. OCSUsers.vbs).  To execute it, just type the script name on a command line in a regular cmd window.

Note: if the OCS user policy value is blank for a user, the setting is to use the default Global policy setting.

While a script like this is good for a one-time verification, if you have larger user inventory and usage reporting needs, there are 3rd-party products such as Quest MessageStats which provide these types of reports for both OCS and Lync.

For more information on OCS to Lync migrations, see:

  1. Migration from Office Communications Server 2007 R2 to Lync Server 2010:
  2. Lync & OCS Migration Top 10:
Share and Enjoy:
  • Twitter
  • Digg
  • StumbleUpon
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Technorati

2 comments to Saving OCS User Settings Before a Lync Migration

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>