Add a script for checking for installed choco packages

This commit is contained in:
Manuel Thalmann 2024-07-31 14:53:21 +02:00
parent 1012705160
commit 90675f3e14

View 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));
}