src/Get-CciModule.ps1
|
function Get-CciModule { <# .SYNOPSIS List locally installed PowerShell modules whose name starts with 'Cci.' or matches -Name. #> [CmdletBinding()] param( [string]$Name ) if (-not $Name) { # Default: everything cciget manages - canonical Cci.* plus each # configured v2 feed's tenant prefix (cciit.*). $patterns = @('Cci.*') foreach ($feed in (Get-CciGetConfig).feeds) { $prefixProp = $feed.PSObject.Properties['prefix'] $p = if ($prefixProp) { $prefixProp.Value } if ($p) { $patterns += "$p.*" } } return $patterns | ForEach-Object { Get-InstalledPSResource -Name $_ -ErrorAction SilentlyContinue } | Sort-Object Name, Version -Unique } Get-InstalledPSResource -Name $Name -ErrorAction SilentlyContinue } |