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}
展開が完了したかどうかを確認する方法がありますが、ソリューションのインストールを開始する準備ができている:ここで私が現在働いているスニペットはありますか?