Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is there an stsadm command that will enumerate / list all web applications? This would be the similar to SPWebService.AdministrationService.WebApplications.

What I'm looking for is an stsadm command that will return a list of web applications, their name and URL.

btw - sorry for the unknown (yahoo) user name. I'm not sure how to associate my open id that is used on SO, Meta, etc... The open id being used is the same for SharePoint Overflow and the other sites. And my SPO profile doesn't provide an option to associate with the other sites.

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

You can use the following stsadm commands to get the information you need:

stsadm -o enumzoneurls
stsadm -o enumalternatedomains

or use the PowerShell cmdlet:

Get-SPWebApplication
share|improve this answer
    
enumzoneurls is exactly what I was looking for. Thanks! (I'd upvote you, but I don't have enough rep right now) –  Metro Smurf Mar 16 '11 at 14:33
add comment

I've used this PowerShell to get sites and owner information. Can be extended to get more info. Not my script; I just can't find the URL right now to point you to the site:

$webappUrl = "INSERT URL HERE";

Clear-Host $12HivesDir = "${env:CommonProgramFiles}\Microsoft Shared\web server extensions\12\" function get-spweb ([String]$webUrl=$(throw 'Parameter -webUrl is missing!')) { $site = New-Object -TypeName "Microsoft.SharePoint.SPSite" -ArgumentList "$webUrl"; return $site.OpenWeb(); } function get-spwebInfo ($web) { Write-Host $web.Title Write-Host $web.Url if ($web.Webs.Count -ne 0) { Write-Host "=======================================" Write-Host "Sub webs of " $web.Title Write-Host "=======================================" foreach ($subweb in $web.Webs) { get-spwebInfo($subweb); $subweb.Dispose(); } Write-Host "=======================================" } if ($web.Webs.Count -ne 0) { Write-Host "=======================================" Write-Host "Sub webs of " $web.Title Write-Host "=======================================" Write-Host "SiteAdministrators: " $web. SiteAdministrators Write-Host "Url: " $web.Url Write-Host "LastItemModifiedDate: " $web.LastItemModifiedDate

  foreach (SPList list in web.Lists)

{ foreach(SPListItem item in list.Items) { Write-Host ìListItemTitle: ì + item.Title; Write-Host ìListItemUrl: ì + item.Url;

  foreach ($subweb in $web.Webs)
  {
        get-spwebInfo($subweb);
        $subweb.Dispose();
  }
  Write-Host "======================================="

}

}

$devWeb = get-spweb $webappUrl get-spwebInfo($devWeb) $devWeb.Dispose();

share|improve this answer
    
This appears to enumerate the sites within a known site collection / web application. I just need to find all the web applications on the server. –  Metro Smurf Mar 16 '11 at 14:32
add comment

And also have a look at these scripts:

http://sharepointpsscripts.codeplex.com/releases/view/21675

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.