function Restore-AllWebApplications { <# .SYNOPSIS This will reinstall all the webApplications found locally in the chocolatey folder. This does not upgrade the webApplications. #> [CmdletBinding()] [OutputType([void])] param ( ) $logLead = (Get-LogLeadName) $allPackages = (Get-AllInstalledComponentsByType -ComponentType WebApplication) Write-Host "$logLead : Found the following packages to install" $allPackages | Format-Table @{Name = "Package Name"; Width = 40; Expression={$_.PackageName}},@{Name = "Manifest Path"; Expression={$_.ManifestPath}} $installerPath = (Get-ComponentInstallerInstallPath -ComponentType WebApplication) Invoke-Parallel2 -Objects @($allPackages.ManifestPath) -Arguments @($installerPath) -Script { param($manifestPath,$installerPath) & $installerPath $manifestPath} }