command-prompt First of all, don’t panic! Office Communications Server (OCS) 2007 R2 still has a nice graphical setup wizard that guides you through the installation process. But sometimes, for very specific tasks, the command line is your best friend.

This post is more a “note to self”, since I use this commands a lot, but I hope you find it useful too.


OCS 2007 R2

For OCS, the command-line utilities LCSCMD and RGSCOT are installed with the Office Communications Server 2007 R2 Administrative Tools. By default, they are located in the following location %ProgramFiles%\Common Files\Microsoft Office Communications Server 2007 R2.

To request a Web Server certificate from an online CA for Communicator Web Access:

LcsCmd.exe /Cert /Action:Request / /,,,,
/ca:"\Contoso Root CA" /OU:IT /org:Contoso /country:PT
/city:Lisbon /state:Lisbon /friendlyName:CWACertificate /exportable:TRUE

To generate the Web Server certificate request file for Communicator Web Access:

LcsCmd.exe /Cert /Action:Request / /,,,,
/filename:c:\certrequest.txt /OU:IT /org:Contoso /country:PT /city:Lisbon
/state:Lisbon /friendlyName:CWACertificate /Online:FALSE /exportable:TRUE

To create contact objects for Response Group Service:

RGSCOT /Create / /DisplayName:"Information Desk" 
/DisplayNumber:+3515555555 /
RGSCOT /Create / /DisplayName:"Help Desk"
/DisplayNumber:+3519999999 /


Exchange Server 2007

When integrating Exchange Unified Messaging with OCS, there might be necessary to generate a new certificate, in order to replace the self-signed generated automatically by Exchange. This time, instead of using command-line utilities, I’ll use some Exchange Management Shell cmdlets.

To generate the request for the UM certificate:

New-ExchangeCertificate -generaterequest -subjectname "dc=com,dc=contoso,o=Contoso," -domainname UM-SERVER,, -PrivateKeyExportable $true -path c:\certrequest.txt

To import the issued certificate:

Import-ExchangeCertificate -Path c:\certnew.cer

To enable the certificate:

Enable-ExchangeCertificate -Thumbprint 5113ae0233a72fccb75b1d0198628675333d010e 
-Services "POP, IMAP, UM, IIS"


This is just a sample of some commands that I generally use when installing and configuring OCS 2007 R2. There are many, many more actions that can be performed using the command line, such as preparing Active Directory, installing server roles, creating pools, moving the backend database and so on, and so on.

BTW, before you ask, there are still no specific PowerShell cmdlets for OCS 2007 R2. Let’s wait for OCS Wave “14”!