src/Update-CciModule.ps1
|
function Update-CciModule { <# .SYNOPSIS Update an installed CCI module to the latest version available in a tenant feed. #> [CmdletBinding()] param( [Parameter(Mandatory, Position = 0)] [string]$Name, [string]$Tenant, [ValidateSet('CurrentUser','AllUsers')] [string]$Scope = 'CurrentUser' ) if (-not $Tenant) { $Tenant = (Get-CciGetConfig).defaultFeed } $feed = (_Resolve-CciGetFeed -Tenant $Tenant)[0] $repoName = _Get-CciGetRepositoryName -FeedName $feed.name Update-PSResource -Name $Name -Repository $repoName -Scope $Scope } |