function Test-WinUtilPackageManager { <# .SYNOPSIS Checks if WinGet and/or Choco are installed .PARAMETER winget Check if WinGet is installed .PARAMETER choco Check if Chocolatey is installed #> Param( [System.Management.Automation.SwitchParameter]$winget, [System.Management.Automation.SwitchParameter]$choco ) if ($winget) { if (Get-Command winget -ErrorAction SilentlyContinue) { $status = "installed" } else { $status = "not-installed" } } if ($choco) { if (Get-Command choco -ErrorAction SilentlyContinue) { $status = "installed" } else { $status = "not-installed" } } return $status }