Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: How to get the list of Project administrators

$
0
0

I have used this VBScript in the past to get the TDAdmins of all active projects (assuming your user is present in all of them):

 

    user = InputBox("User:")
    password = InputBox("Password:")
    servername = InputBox("Server name:")

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.OpenTextFile("c:\listAdminUsers.txt", 8, True)
    Set tdc = CreateObject("tdapiole80.tdconnection")
    tdc.InitConnectionEx ("http://" & servername & ":8080/qcbin")
    tdc.Login user, password
    Set domainList = tdc.VisibleDomains
    For Each dom in domainList
        f.WriteLine "*************************** " & dom & " ***************************"
        For Each proj In tdc.VisibleProjects(dom)
            tdc.Connect dom, proj
            f.WriteLine "----------------------- " & proj & " -----------------------"
            Set cust = tdc.Customization
            cust.Load
            Set custUsers = cust.Users
            Set users = custUsers.Users

            For Each usr in users
                If usr.InGroup("TDAdmin") Then
                    f.WriteLine usr.Name
                End If
            Next
            Set cust = Nothing
            Set custUsers = Nothing
            Set users = Nothing
            tdc.Disconnect
        Next
    Next

    tdc.ReleaseConnection
    f.Close
    Set domainList = Nothing
    Set fso = Nothing
    Set f = Nothing
    Set tdc = Nothing
    MsgBox "Finished listing users"

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>