Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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();

And also have a look at these scripts:

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

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top