문제

I 인벤토리를 수행하고 모든 개별 웹 응용 프로그램에 배포 된 SharePoint 솔루션 (* .wsp) 목록을 가져와야하며 이상적으로는 웹 서버이 웹에서 어떤 응용 프로그램 풀을 나열하는 것도 좋습니다.- 응용 프로그램은? 에 속합니다

다음과 같은 것 >>

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

get-spsolution 을 사용하여 시도했지만 출력에는 웹 앱 이름 및 get-spwebapplication 가 포함되어 있지 않습니다.각 웹 앱이 나열됩니다.

stsadm -o enumsolutions 은 필요한 정보를 포함하는 것으로 보이지만 출력 형식을 위에서 언급 한 무언가로 변경하는 방법을 모르겠습니다.

W2K8R2 STD에서 실행중인 MS SharePoint Server 2010입니다.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top