2011-09-13 3 views
2

추가하고 설치할 SharePoint 응용 프로그램 용 솔루션이 들어있는 폴더가 있습니다. 폴더의 요소를 반복하고 Add-SPSolution을 사용하고 싶습니다. 그런 다음 Install-SPSolution을 사용하기 전에 솔루션 배포가 완료되었는지 확인하고 싶습니다.PowerShell을 사용하여 솔루션을 자동으로 배포

# Get the location of the folder you are currently in 
    $dir = $(gl) 

    # Create a list with the .wsp solutions 
    $list = Get-ChildItem $dir | where {$_.extension -eq ".wsp"} 

    Write-Host 'DEPLOYING SOLUTIONS...' 
    foreach($my_file in Get-ChildItem $list){Add-SPSolution -LiteralPath $my_file.FullName} 

    Write-Host 'SLEEP FOR 30 SECONDS' 
    Start-Sleep -s 30 

    Write-Host 'INSTALLING SOLUTIONS...' 
    foreach($my_file in Get-ChildItem $list){Install-SPSolution -Identity $my_file.Name -AllWebApplications -GACDeployment} 

배포가 완료되었는지 확인하는 방법이 있습니다, 그리고 솔루션 설치를 시작할 준비가 : 여기 내가 현재 일하고 코드 조각은?

답변

관련 문제