Question

J'effectue un inventaire et je dois obtenir une liste des solutions SharePoint (* .WSP) déployées sur chaque application Web individuelle et idéalement, il serait également super de répertorier le pool d'applications sur quel serveur Web ce Web-Application appartient à?

quelque chose comme ça >>

solution-name.wsp / web-application-name / application-pool-name

J'ai essayé d'utiliser get-spsolution , mais la sortie ne contient pas de nom d'application Web et get-SPWebApplication ne donne pas la liste de .WSP pourchaque application Web répertoriée.

Stsadm -o Enumsolutions semble contenir des informations dont j'ai besoin, mais je ne sais pas comment changer le format de sortie en quelque chose de similaire mentionné ci-dessus.

Ceci est MS SharePoint Server 2010 en cours d'exécution sur W2K8R2 STD.

Était-ce utile?

La solution

First, get all your web applications and iterate through them. While in the loop print web application name and application pool name. Last, iterate all solutions and print their names - like this:

$contentWebAppServices = (Get-SPFarm).services |
 ? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}

foreach($webApp in $contentWebAppServices.WebApplications)
{
    Write-Host "Web Application  : " $webApp.name
    Write-Host "Application Pool : " $webApp.ApplicationPool.Name

    Get-SPSolution | ForEach-Object {
        if ($_.LastOperationDetails.IndexOf($webApp.url) -gt 0) 
        {
            Write-Host "    Solutions:"
            Write-Host "   " $_.DisplayName
        }
    }
} 

The output looks like this:

Web Application  :  SharePoint - 1337
Application Pool :  SharePoint - 1337
Web Application  :  SharePoint - 80
Application Pool :  SharePoint - 80
    Solutions:
    customer.intranet.wsp

The first web application (SharePoint - 1337) doesn't have deployed solutions, but the second (SharePoint - 80) has one.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top