22 lines
812 B
PowerShell
22 lines
812 B
PowerShell
function Restore-AllWidgets {
|
|
<#
|
|
.SYNOPSIS
|
|
This will reinstall all the widgets found locally in the chocolatey folder.
|
|
This does not upgrade the widgets.
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([void])]
|
|
param (
|
|
)
|
|
|
|
$logLead = (Get-LogLeadName)
|
|
|
|
$allPackages = (Get-AllInstalledComponentsByType -ComponentType Widget)
|
|
|
|
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 Widget)
|
|
Invoke-Parallel2 -Objects @($allPackages.ManifestPath) -Arguments @($installerPath) -Script { param($manifestPath,$installerPath) & $installerPath $manifestPath}
|
|
}
|