How can one programatically discover a pool? RRS feed

  • Question


    I've looked through the WMI code, SQL tables, AD...and I can't come up with a definitive way of getting all the servers within a pool.


    Here is what I have so far, for querying WMI:


    Components WMI Class Relation To Pool Property Name Availability
    Front End Servers MSFT_SIPPoolSetting PoolFQDN PoolMemberList[] - Array of front end servers Global AD
    Edge Servers MSFT_SIPEdgeProxySetting None EdgeProxyFQDN Global AD
    Archiving and CDR Server MSFT_SIPArchivingServerSetting  None dNSHostName Global AD
    Forwarding Proxy Server MSFT_SIPForwardingProxySetting None FQDN Global AD
    Mediation Server: MSFT_SIPMediationServerSetting None FQDN Global AD
    Back-end DB Servers MSFT_SIPPoolConfigSetting/MSFT_SIPPoolSetting(use this) PoolFQDN BackEndDBPath Pool (SQL)
    Web Access Server MSFT_CWAServerSetting (not in AD--local to machine) None Name Machine 
    Web conferencing server MSFT_SIPWebComponentsServerSetting PoolDN FQDN Global AD
    A/V Conferencing Server MSFT_SIPMCUSetting -> filter to get the av mcu None FQDN WHERE MCUDN starts with "CN=LS AV MCU" Global AD
    Users MSFT_SIPESUserSetting HomeServerDN DisplayName / InstanceID / UserDN / Etc Global AD
    Federated Users SQL? Users.UserURI not in WMI.UserSetting.PrimaryURI N/A N/A SQL
    Federated Servers MSFT_SIPFederationPartnerTable(not in AD--local to machine) EdgeProxyAddress Domain Machine 



    My problem is that I can't relate a lot of the items back to a pool.  Another problem: I don't know how to find the web access server.  I see the class in WMI, but it's only available ON the actual server...I don't know how to get the servername itself.


    Has anyone written a 'discovery' type utility for OCS 2007?   If so, what did you use to actually get the data?

    FWIW: I'll be coding this in either C++ or C#.


    Any help would be greatly appreciated.




    Friday, October 26, 2007 7:01 PM

All replies

  • Does this help?


    Code Block

    ' Set the AD naming context.
    Set objRootDSE = GetObject("LDAP://rootDSE")
    strNamingContext = objRootDSE.Get("rootDomainNamingContext")

    Set objConnection = CreateObject("ADODB.Connection")
    objConnection.Provider = "ADsDSOObject"
    objConnection.Open "Active Directory Provider"
    ' Create connection to AD.
    Set objCommand = CreateObject("ADODB.Command")
    objCommand.ActiveConnection = objConnection

    ' Disable caching to reduce memory consumption for very large result sets.
    objCommand.Properties("Cache Results") = False
    ' Define the maximum page size.
    objCommand.Properties("Page Size") = 1000
    ' Set timeout on 30 secs.
    objCommand.Properties("Timeout") = 30
    ' Set searchscope to subtree
    objCommand.Properties("Searchscope") = 2
    ' Search for OCS 2007 pools.
    Set objPools = GetObject _
        ("LDAP://CN=Pools,CN=RTC Service,CN=Microsoft,CN=System," & strNamingContext)

    ObjPools.Filter= Array("msRTCSIP-Pool")
    For Each objPool in objPools
     strFQDN = UCase(objPool.dnsHostName)
     WScript.echo strFQDN
     strPoolDN = "CN=LC Services,CN=Microsoft," & objPool.distinguishedName
     WScript.echo strPoolDN




    Tuesday, October 30, 2007 1:49 PM

    Although this is great code, it unfortunately doesn't help Sad


    I've started writing all the code to get every server belonging to a pool.  There are quite a few gaps in the SDK for getting a servers relationship to pools.  If a domain has more than one pool in it, it's hard to tell what pool the server belongs to.  At least for the front-end servers and a couple others, the relationship is straightforward enough...but for others, there's no way of knowing what pool the server belongs to.


    Thanks for the code, nonetheless.



    Thursday, November 1, 2007 2:02 PM