After posting that reply, I found myself wondering how you would programatically get all the URLs (given that you need to run [tt]stsadm -o enumcontentdbs[/tt] for each URL)...
[tt]stsadm -o enumzoneurls[/tt] might help. It does list all the web applications, but it also shows the alternate URLs too so you'd need to filter the output, perhaps just looking for the Default URLs.
Anyway, I'm probably heading off on a tangent here as you didn't actually ask that question... ;-)
SPWebServiceCollection webServices = new SPWebServiceCollection(SPFarm.Local);
foreach (SPWebService webService in webServices)
foreach (SPWebApplication webApplication in webService.WebApplications)
foreach (SPSite siteCollection in webApplication.Sites)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.