Archive for November, 2011

28 NovRolling Back Schema Preparation for Lync Server 2010

A lot of requests have come up in the past both on the Microsoft TechNet forums and during previous engagements around how to mitigate the risks involved in extending the AD schema for Lync Server 2010.

There are rollback processes that come with Lync Server 2010 to remove the forest and domain level changes, but once you’ve done the schema level change, there’s no way of rolling back the changes using the Lync Server 2010 tools.

For a lot of IT teams, this will be acceptable as there is inherent faith in Microsoft’s ability to extend its own schema.
However, if your AD environment is heavily regulated by IT governance and your change control guidelines require a back out process for each change, there is a way to provide this. I’ll outline each step below.

Isolating the Schema Master from AD

To provide a back out plan for this change, the following risk mitigation prerequisite steps must be carried out prior to running the actual AD schema preparation step:

  1. Log on to the domain controller that holds the Schema Master FSMO role.
  2. Temporarily suspend AD replication capability from the domain controller using the following step
    1. From a Command Prompt, run:
      repadmin /options +DISABLE_OUTBOUND_REPL

This process will suspend outbound AD replication from this domain controller, meaning changes we make won’t replicate to all of AD. Alternatively, you can disable the NIC of the machine, or disconnect it completely if it is a physical machine to achieve the same outcome.

Running Schema Preparation

To prepare schema for Lync, log onto the domain controller that holds the Schema Master FSMO role. You can then prepare the schema using either the Lync Server 2010 Deployment Wizard or the Lync Server 2010 Management Shell.

I’m not going to republish what is already documented, so here are the Microsoft TechNet library articles for performing the Schema Preparation step using both methods mentioned above:

Using Setup to Run Schema Preparation

Using Cmdlets to Run Schema Preparation

To prepare schema of the forest, you must be using an account with Schema Admins group membership.

Verifying Schema Preparation Completed Successfully

From the previously linked TechNet article:

  1. Log on to a domain controller as a member of the Enterprise Admins group.
  2. Open ADSI Edit by running adsiedit.msc from the Run command.
  3. On the Action menu, click Connect to.
  4. In the Connection Settings dialog box under Select a well known Naming Context, select Schema, and then click OK.
  5. Under the schema container, search for CN=ms-RTC-SIP-SchemaVersion. If this object exists, and the value of the rangeUpper attribute is 1100 and the value of the rangeLower attribute is 14, then the schema was successfully updated. If this object does not exist or the values of the rangeUpper and rangeLower attributes are not as specified, then the schema was not modified.

Reintroducing the Schema Master to AD

Once you’ve verified that the AD schema preparation was successful, you can roll back the risk mitigation prerequisite by completing the following steps:

  1. Log on to the domain controller in the domain that holds the Schema Master FSMO role.
  2. From a Command Prompt, run:
    repadmin /options -DISABLE_OUTBOUND_REPL.

If you chose the option to disable/disconnect the NIC, you can reconnect/re-enable this now.

From here, you can carry out the AD Forest and Domain preparation steps for Lync.

Rolling back if Schema Preparation failed

If the schema preparation step has failed for whatever reason, then replication links or network connectivity SHOULD NOT be restored. The following steps are recommended to be carried out:

  1. The domain controller holding the Schema Master FSMO role must be decommissioned from Active Directory and rebuilt.
  2. The Schema Master role should be seized from the original domain controller and homed on another domain controller in the domain.

If these steps are required, they will not affect normal operational functionality or Active Directory structural integrity e.g. account and service logon.

Proving the roll back worked

Use the following steps to prove that the back out was successful:

  1. On a domain controller within the domain, open ADSIEdit.msc.
  2. Navigate to the following container CN=Services,CN=Configuration,DC=contoso,DC=com.
  3. Verify that the CN=RTC Service container does not exist.

From here, you can troubleshoot why the Lync Schema Preparation failed. Once resolved, you should attempt schema preparation again.

Conclusion

Using this process, you can effectively satisfy change control requirements and make sure your Lync Server 2010 deployment isn’t delayed or hindered.
If you’ve got any questions around this, please feel free to post in the comments section.

21 NovCumulative Update 4 for Lync Server 2010 Released

Over the weekend, the much anticipated Cumulative Update 4 for Lync Server 2010 was released. I was up in Scotland enjoying sunny Glasgow so missed out on providing super-cutting edge breaking news, but fellow Modality consultants Tom Arbuthnot and Ari Protheroe and MUCUGL co-founder Adam Jacobs covered it pretty extensively in their blogs.

This CU is a precursor for the Mobility side of things on the server, and is in preparation for the impending release of the Lync Mobile clients for Windows Phone, iPhone, iPad, Android and Symbian. It does not however, actually include the Mobility server components requires to provide functionality for the mobile clients (as Lync MVP Kevin Peters mentioned).

In addition to enabling new functionality, there are a bunch of bugs fixed in this update relating to things like CAC, file transfer, the Address Book service, media flow for AV conferencing and much much more.

There are a few new Lync Server Management Shell cmdlets in CU4, and they all pertain to mobility. I won’t reinvent the wheel here by explaining what they all do as Tom has covered them all really well from the CU4 help file in his blog post above.

As always, these updates are cumulative (hence the name), which means they contain all updates from previous CUs as well. Remember to back up your Lync servers and configuration before applying the update.
The Microsoft download link is available here.

14 NovModality Systems presents Microsoft Lync Roundtable Events

As part of our drive to educate the masses on the brilliance of Microsoft Lync, we’re running a few events in conjunction with Microsoft for both the public and private sectors. The aim of these events is to help organisations better understand the value of Lync, dispel rumours and hearsay.

The first event is for the Public Sector, and will be held at the Millenium Stadium in Cardiff on the 1st of December 2011.
At this event, we’ll be showing you how to leverage the cost saving benefits of Lync and also have customers speaking about their own experiences.

The second event is for the Private Sector, and will be held at the Williams F1 Conference Centre on the 19th January 2012.
This event will focus on how Lync can make your business more competitive in the marketplace, increase productivity and rationalise your infrastructure costs. We’ll also be offering a Proof of Concept Initiative on the day to attendees.
Plus, a go in the F1 simulator. Cool huh?

For more details and registration information, check out the post on the Modality Systems blog.

These events are going to be chock-a-block with great content to get you excited about Lync, and they’re going to be held in some fantastic venues. Places are limited, so get in quick to secure your spot.

14 NovHow to retrieve all users with a specific country code in Lync

Recently I came across a scenario where I needed to retrieve a list of all voice users on OCS 2007 R2 with a French phone number using Lync Server Management Shell (LSMS). It took me a bit of work and help from scripting guru and fellow Modality consultant Tom Arbuthnot, but I ended up getting something sorted that did what I needed.

Building the Base Cmdlet

Based on the fact that French phone numbers begin with +33 in the number string and the users we need to find are on OCS 2007 R2, this gives us two requirements to get our LSMS cmdlet going.

The first switch we apply in the Get-CsUser cmdlet is -OnOfficeCommunicationServer to search for users on legacy pools (OCS 2007 or OCS 2007 R2).
The second switch we apply is the -filter switch followed by the user attributes we want to filter by. We also need to specify whether we want to match exactly (e.g. EnterpriseVoiceEnabled -eq $true) or search for a string like what we specify (LineURI -like “tel:+33*”).

So initially, we produce this cmdlet in LSMS with the appropriate filter to search for Enterprise Voice enabled users with a Line URI starting with tel:+33:

Get-CsUser -OnOfficeCommunicationServer -Filter {EnterpriseVoiceEnabled -eq $true -and LineURI -like “tel:+33*”}

This cmdlet will give you a list of users with French phone numbers but will also list heaps of info like the users’ client policy, voice policy, yada yada yada, which we want to get rid of.

Cutting out the fluff

I just wanted the names and numbers of our French users, so I modified the command to just show me this info by piping the cmdlet to a formatted table with only the properties I wanted to see:

Get-CsUser -OnOfficeCommunicationServer -Filter {EnterpriseVoiceEnabled -eq $true -and LineURI -like “tel:+33*”} | ft -property DisplayName, LineURI

This cmdlet will give us the same information again, but will give us a nice looking table with just the DisplayName and LineURI attributes that we want.

This will print the search results out in your current LSMS session, however if you’d like to export these out to text file to send via email, run this command:

Get-CsUser -OnOfficeCommunicationServer -Filter {EnterpriseVoiceEnabled -eq $true -and LineURI -like “tel:+33*”} | ft -property DisplayName, LineURI | Out-File C:\voice_users_export.txt

Your list of users will then be exported out to file to the path you specify after Out-File.

Taking it further

You can take this cmdlet and do a few other things also based on your requirements. Like if you’d like to get users on Lync Server rather than OCS, change the switch in your command from -OnOfficeCommunicationServer to -OnLyncServer e.g.

Get-CsUser -OnLyncServer -Filter {EnterpriseVoiceEnabled -eq $true -and LineURI -like “tel:+33*”} | ft -property DisplayName, LineURI | Out-File C:\voice_users_export.txt

Obviously you could modify this to retrieve users with all other kinds of numbers also. Just change the +33 to the country code assigned to your Enterprise Voice enabled users to whatever other country code you need.

Hope this command or a part of it helps you with your voice documentation/ investigation work on Lync/OCS 2007 R2.

10 Nov#ucomsldn and MUCUG London Christmas Drinks

Given that the next MUCUG London event isn’t until January, we all decided we couldn’t let Christmas roll past without getting together for a few and talking about the end of the year frenzy/slowdown/other misc goings on.

I haven’t run a #ucomsldn tweetup in a while, so I decided to revive the hashtag and we’ve packaged it up together with MUCUG London to have a good yuletide last hurrah for the year.

So if you’re in London/South East and work in UC (not just Microsoft – we get industry analysts and people from all vendors along), come down to Doggett’s near Blackfriars Bridge on the Southbank on the 8th December from 6:30pm for a few ales.

Event invite and all other important details here – http://twtvite.com/ucomsldnxmas2011

Hope to see you there!

07 NovExporting and importing contact lists in Lync Server 2010

I’ve been doing a fair bit of work around coexistence and migration lately and throwing contact lists around all over the place using dbimpexp. In light of this, I thought it’d be a good idea to do up a post to help you understand what dbimpexp.exe is as it’s a super useful bit of kit to have at your disposal during a Lync implementation/migration or during day-to-day operations.

If you’ve had experience backing up or restoring OCS 2007 R2 or Lync Server, chances are you’ll be familiar with dbimpexp. It’s very helpful for moving contact lists in a DR situation or between deployments in different domains. The only constant is that the SIP address must be the same when exporting or importing, so there’s no dependency on the AD domain that the contact lists have been exported from or are being imported into.

What is Dbimpexp?

Essentially (as per Microsoft), it’s a utility for exporting, managing and importing XML files containing homed resource data from a Microsoft Lync Server 2010 SQL database. When they say homed resource data, they mean user contact lists and conference directories. Dbimpexp allows you to import or export users’ contact lists either on a per user basis or a bulk pool-wide basis.

Using dbimpexp.exe

Dbimpexp.exe is located in C:\Program Files\Common Files\Microsoft Lync Server 2010\Support on a Lync Front End Server. You’ll be running it on one of your Enterprise Edition Front End servers or your Standard Edition server to export or import users’ contact lists.

The commands are slightly different for Standard and Enterprise Edition Front Ends, so I’ll cover both in the following sections.

Exporting Contact Lists

So the first thing we want to do is get those contact lists out of one server/pool so we can have them stored to restore in the event of failure, or so we can import them into a new server where the SIP domain is the same. We can export the contact list of an individual or the contact lists of all users on the server/pool.

Standard Edition

For Lync Server Standard Edition, we run the following commands to export users’ contact lists.

For a Single User

This will export out an XML file of the contact list for the single user you specify:

dbimpexp.exe /user:<sip address> /hrxmlfile:”<path that you want to write the xml file to>”

So an example of this would be:
dbimpexp.exe /user:jmorris@justin-morris.net /hrxmlfile:”C:\justin.xml”

For all users homed on the server

This will export out an XML files of all users’ contact lists on the server/pool:

dbimpexp.exe /hrxmlfile:”<path that you want to write the xml file to>”

An example of this would be:
dbimpexp.exe /hrxmlfile:”C:\allusers.xml”

Enterprise Edition

For Lync Server Enterprise Edition, we need to specify the backend SQL instance to connect to that the rtc database resides on. Run the following commands to export users’ contact lists from your Enterprise Edition Front End pool:

For a Single User

This will export out an XML file of the contact list for the single user you specify:

dbimpexp.exe /user:<sip address> /sqlserver:”<SQL Server FQDN\instance name>” /hrxmlfile:”<path that you want to write the xml file to>”

So an example of this would be:
dbimpexp.exe /user:justin@justin-morris.net /sqlserver:”SQL01.justin-morris.net\LYNC” /hrxmlfile:”C:\justin.xml”

For all users homed on the pool

This will export out an XML files of all users’ contact lists on the server/pool:

dbimpexp.exe /sqlserver:”<SQL Server FQDN\instance name>” /hrxmlfile:”<path that you want to write the xml file to>”

So an example of this would be:
dbimpexp.exe /sqlserver:”SQL01.justin-morris.net\LYNC” /hrxmlfile:”C:\justin.xml”

Importing Contact Lists

So now that we’ve exported our contact lists from the source server/pool, we can take the XML files that dbimpexp has created and import the contact lists into the target server/pool.

The only difference between the export and import commands is that to import users, you need to specify the /import switch and the restore type switch of /restype:user (which is different from /restype:all which will attempt to import the conference directories also).

Standard Edition

For Lync Server Standard Edition, we run the following commands to import users’ contact lists.

For a Single User

This will import the contact list from the XML file for the single user you specify:

dbimpexp.exe /import /user:<sip address> /hrxmlfile:”<path where the xml file resides>” /restype:user

So an example of this would be:
dbimpexp.exe /import /user:jmorris@justin-morris.net /hrxmlfile:”C:\justin.xml” /restype:user

For all users homed on the server

This will import all users’ contact lists on the server/pool from the XML file you specify:

dbimpexp.exe /import /hrxmlfile:”<path where the xml file resides>” /restype:user

An example of this would be:
dbimpexp.exe /import /hrxmlfile:”C:\allusers.xml” /restype:user

Enterprise Edition

For Lync Server Enterprise Edition, we run the following commands to import users’ contact lists.

For a Single User

This will import the contact list from the XML file for the single user you specify:

dbimpexp.exe /import /user:<sip address> /sqlserver:”<SQL Server FQDN\instance name>” /hrxmlfile:”<path where the xml file resides>” /restype:user

So an example of this would be:
dbimpexp.exe /import /user:justin@justin-morris.net /sqlserver:”SQL01.justin-morris.net\LYNC” /hrxmlfile:”C:\justin.xml” /restype:user

For all users homed on the pool

This will import all users’ contact lists on the server/pool from the XML file you specify:

dbimpexp.exe /import /sqlserver:”<SQL Server FQDN\instance name>” /hrxmlfile:”<path where the xml file resides>” /restype:user

So an example of this would be:
dbimpexp.exe /sqlserver:”SQL01.justin-morris.net\LYNC” /hrxmlfile:”C:\allusers.xml” /restype:user

Conclusion

So as you can see, it’s a really good tool to have up your sleeve. It’s great for restoring data after you’ve had to do a force move of users or have just rebuilt a new server and have a working Front End ready to go.

If you’ve got any questions about how it works or when you’d need to use it, drop me a comment below.