How to loop through Domains and all the Projects in each Domain for extracting Information from ALM!!

Posted: January 31, 2014 in Uncategorized

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"

Above code looks promising!!!!

Reference: http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/How-to-get-the-list-of-Project-administrators/m-p/6286019

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s