Useful commands when deploying OCS 2007 R2
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 /sn:im.contoso.com /san:im.contoso.com,
download.im.contoso.com,as.im.contoso.com,cwa.contoso.com,cwa-server.contoso.com
/ca:"ca-server.contoso.com\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 /sn:im.contoso.com /san:im.contoso.com,
download.im.contoso.com,as.im.contoso.com,cwa.contoso.com,cwa-server.contoso.com
/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 /PoolFQDN:ocspool.contoso.com /DisplayName:"Information Desk"
/DisplayNumber:+3515555555 /PrimaryUri:sip:InformationDesk@contoso.com
/LineUri:tel:+3515555555
RGSCOT /Create /PoolFQDN:ocspool.contoso.com /DisplayName:"Help Desk"
/DisplayNumber:+3519999999 /PrimaryUri:sip:HelpDesk@contoso.com
/LineUri:tel:+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,
cn=um-server.contoso.com" -domainname UM-SERVER,um-server.contoso.com,
autodiscover.contoso.com -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”!