ps/Modules/Alkami.PowerShell.Common/Public/Test-IsPsModuleInstalled.ps1

15 lines
363 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function Test-IsPsModuleInstalled {
<#
.SYNOPSIS
Wrapper around Get-Module -ListAvailable which returns the result in a useful boolean format.
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[Alias("ModuleName")]
[string]$Name
)
$result = Get-Module $name -ListAvailable
return ($null -ne $result)
}