none
How to set msRTCSIP-UserPolicies and msRTCSIP-DeploymentLocator during provisioning RRS feed

  • Question

  • Trying to set the msRTCSIP-UserPolicies and msRTCSIP-DeploymentLocator values in our provisioning script.

    I'm no developer so I hope sone here can point me to a possible solution.

    How do set the values in the script portion below:

    ' Construct the Exchange HomeServer path together
    ' Example>
    ' /o=company/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=CL-4072
    ' /o=company/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=SR-4073
    exchHomeSrv = "/o=" & exchOrg & "/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=" & exchSrv

    ' Select the Exchange database RANDOMLY
    Dim mailboxMDB As String
    Dim rdnNumber As Integer

    Randomize()
    rdnNumber = Int((mailboxMDBs - 1 + 1) * Rnd() + 1)
    mailboxMDB = "DB0" & rdnNumber

    ' Construct the Exchange database path together
    ' Example:
    ' CN=MDB-02,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=company,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=efroot,DC=ads
    ' CN=MDB-09,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=company,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=efroot,DC=ads
    mailMDB = "CN=" & mailboxMDB & ",CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=" & exchOrg & ",CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=efroot,DC=ads"

    'mailMTA()
    'CN=Microsoft MTA,CN=SR-4073,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=company,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=efroot,DC=ads
    mailNickName = accountName

    ' Create Mailbox for user
    csentry = ExchangeUtils.CreateMailbox(resourceAdMA, dn, mailNickName, mailMDB)

    ' Construct the HomePath
    home = homeSrv & "\" & accountName

    ' use password generated in the portal
    Pwd = mventry("unicodePwd").Value

    ' Set the distinguished name
    csentry.DN = dn
    ' Set the Account name
    csentry("sAMAccountname").Value = accountName
    ' Set the Account name
    'csentry("cn").Value = FullName
    ' Set the password
    csentry("unicodePwD").Value = Pwd
    ' Set the password to be changed
    csentry("PwdLastSet").IntegerValue = "0"
    ' Set the userAccountControl
    csentry("userAccountControl").IntegerValue = "512"
    ' Set the userPrincipalName
    csentry("userPrincipalName").Value = upn
    ' Set the ProfilePath
    csentry("profilePath").Value = profileFolderPath
    ' Set the TerminalServerProfilePath
    csentry("userParameters").Value = TSprofileFolderPath
    ' Set the homeDrive
    csentry("homeDrive").Value = homeDrive
    ' Set the homeFolder
    csentry("homeDirectory").Value = home
    ' Set the msExchHomeServerName
    csentry("msExchHomeServerName").Value = exchHomeSrv
    ' Set the mDBUseDefaults
    csentry("mDBUseDefaults").Value = "TRUE"

    ' Lync2010 Provisioning Code
    ' Constuct msRTCSIP-PrimaryUserAddress
    ' Example: ' Example: CN=Lc Services,CN=Microsoft,CN=1:1,CN=Pools,CN=RTC Service,CN=Microsoft,CN=System,DC=efroot,DC=ads
    Dim PrimaryHomeServer As ReferenceValue
    Dim PrimaryHomeServerStrCN As String
    Dim PrimaryHomeServerStrDN As String
    PrimaryHomeServerStrCN = "CN=LC Services"
    PrimaryHomeServerStrDN = "CN=Microsoft,CN=2:2,CN=Pools,CN=RTC Service,CN=Microsoft,CN=System,DC=efroot,DC=ads"
    PrimaryHomeServer = resourceAdMA.EscapeDNComponent(PrimaryHomeServerStrCN).Concat(PrimaryHomeServerStrDN)

    csentry("msRTCSIP-PrimaryHomeServer").ReferenceValue = PrimaryHomeServer
    csentry("msRTCSIP-FederationEnabled").BooleanValue = True
    csentry("msRTCSIP-InternetAccessEnabled").BooleanValue = True
    csentry("msRTCSIP-UserEnabled").BooleanValue = True
    csentry("msRTCSIP-OptionFlags").IntegerValue = 257
    csentry("msRTCSIP-PrimaryUserAddress").StringValue = "sip:" & upn
    ' csentry("msRTCSIP-DeploymentLocator").Value = "SRV:"
    ' csentry("msRTCSIP-userpolicies").IntegerValue = "0=194096023"

    ' Do it!
    csentry.CommitNewConnector()

           

    • Edited by Brenkster Monday, October 14, 2013 8:50 AM
    Monday, October 14, 2013 8:37 AM

All replies