15 lines
363 B
PowerShell
15 lines
363 B
PowerShell
|
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)
|
||
|
}
|