20 lines
431 B
PowerShell
20 lines
431 B
PowerShell
function Test-IsPackagePowerShellModule {
|
|
<#
|
|
.SYNOPSIS
|
|
Returns true if a particular package is considered a PowerShell module.
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([System.Boolean])]
|
|
Param (
|
|
[Parameter(Mandatory=$true)]
|
|
[string]$packageName
|
|
)
|
|
|
|
foreach($match in $_PowerShellModulePackages) {
|
|
if($packageName -like $match) {
|
|
return $true;
|
|
}
|
|
}
|
|
return $false;
|
|
}
|