Helper/Download-BCDevExtension.ps1
function Download-BCDevExtension { param ( [Parameter(Position = 0, Mandatory = $true)] [String]$ExtPublisher = 'Bricklead', [Parameter(Position = 1, Mandatory = $true)] [string]$ExtName, [Parameter(Position = 2)] [string]$ExtVersion = 'latest', [Parameter(Position = 3)] [string]$ExtBranch = 'release-candidate', [Parameter(Position = 4, Mandatory = $true)] [string]$DestinationFolder ) $AppURL = Get-ExtensionURL $ExtPublisher $ExtName $ExtVersion $ExtBranch $TempZip = "$env:TEMP\$([Guid]::newguid().ToString()).zip" Get-File -SourceURL $AppURL -destinationFile $TempZip try { Get-File -SourceURL $AppURL -destinationFile $TempZip Expand-File -Source $TempZip -Destination $DestinationFolder } finally { Remove-Item $TempZip -Force -ErrorAction SilentlyContinue } } Export-ModuleMember -Function Download-BCDevExtension |