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 6eec0251f5
commit 1d388471d9

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