Add a script for checking for installed choco packages
This commit is contained in:
parent
1012705160
commit
90675f3e14
15
scripts/Windows/Scripts/Choco.ps1
Normal file
15
scripts/Windows/Scripts/Choco.ps1
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks whether the specified package has been installed using Chocolatey.
|
||||||
|
|
||||||
|
.PARAMETER Name
|
||||||
|
The name of the package to check.
|
||||||
|
#>
|
||||||
|
function Test-ChocoSoftware {
|
||||||
|
[OutputType([bool])]
|
||||||
|
param(
|
||||||
|
[string] $Name
|
||||||
|
);
|
||||||
|
|
||||||
|
-not [string]::IsNullOrEmpty((choco list --limit-output --exact $name));
|
||||||
|
}
|
Loading…
Reference in a new issue