src/Save-CciModule.ps1
|
function Save-CciModule { <# .SYNOPSIS Download a CCI module to a folder without installing it (for offline transport). #> [CmdletBinding()] param( [Parameter(Mandatory, Position = 0)] [string]$Name, [Parameter(Mandatory, Position = 1)] [string]$Path, [string]$Version, [string]$Tenant ) if (-not $Tenant) { $Tenant = (Get-CciGetConfig).defaultFeed } $feed = (_Resolve-CciGetFeed -Tenant $Tenant)[0] $repoName = _Get-CciGetRepositoryName -FeedName $feed.name $params = @{ Name = $Name Repository = $repoName Path = $Path } if ($Version) { $params.Version = $Version } Save-PSResource @params } |