Functions/Install-OptionalModule.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function Install-OptionalModule { #PSExcel module if($outputs -and $outputs.Contains("excel")){ if (!(Get-Module -ListAvailable -Name PSExcel)) { if($force){ Install-Module -Name PSExcel -force; } else { Install-Module -Name PSExcel; } Get-Command -Module PSExcel | Out-Null; } } } |