A few month ago I had to create a script to automate the proccess of enabling and configuring users for OCS in Active Directory.
I used VBScript for this. MOst part is conventional... however, I had to change the meeting policy from default to something else, this part was tricky.
Enough talking: here you can enjoy the part to change the policy:
'************************************POLICY CHANGE***************************************
strMeetingPolicy="CN={5DC1A974-C49C-477C-A3F7-E54EECEBE3A9},CN=Policies,CN=RTC Service,CN=Microsoft,CN=System,DC=yourdomain,DC=local"
strMeetingPolicyDN1="B:8:01000000:"&strMeetingPolicy
objUser.put "msRTCSIP-UserPolicy", strMeetingPolicyDN1
'************************************POLICY CHANGE***************************************
==> Go first in AD and check the values under the Policies (Domain ==> System ==> Microsoft ==> RTC Service ==> Policies)
Pro Memory: here are the most common used parameters for OCS configuration:
' The msRTCSIP-OptionFlags attribute specifies the different options that are enabled For
' the user. It's a bit-mask value of type integer. Each option is represented by a bit.
' Valid value types are:
' 1: Enabled for public IM connectivity
' 2: Reserved
' 4: Reserved
' 8: Reserved
' 16: RCC (Remote Call Control) enabled [telephony]
' 64: AllowOrganizeMeetingWithAnonymousParticipants
' 128: UCEnabled (enable user for unified communications)
' 256: EnabledForEnhancedPresence
' 512: RemoteCallControlDualMode
' 1024: Enable auto-attendant
' Example: 449 = 256 (Enhanced presence) + 128 (UC enabled) + 64 (anonym. participants) + 1 (public IM)
nOptionFlags = 320
objUser.put "msRTCSIP-PrimaryUserAddress", strPrimaryUserAddress
objUser.put "msRTCSIP-FederationEnabled", bFederationEnabled
objUser.put "msRTCSIP-ArchivingEnabled", nArchivingEnabled
objUser.put "msRTCSIP-InternetAccessEnabled", bInternetAccessEnabled
objUser.put "msRTCSIP-Line", strLine
objUser.put "msRTCSIP-OptionFlags", nOptionFlags
objUser.put "msRTCSIP-PrimaryHomeServer", strPrimaryHomeServer
objUser.put "msRTCSIP-UserEnabled", True
'objUser3.put "msRTCSIP-TargetHomeServer"
'objUser3.put "msRTCSIP-OriginatorSid"
'objUser3.put "msRTCSIP-LineServer"
'objUser3.put "msRTCSIP-UserExtension"
And off course don't forget the: objUser.setinfo at the end