Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/StackHCI/Az.StackHCI.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,15 @@ param(
}
catch
{
Install-PackageProvider NuGet -Force | Out-Null
try
{
Import-PackageProvider -Name Nuget -MinimumVersion "2.8.5.201" -ErrorAction Stop
}
catch
{
Install-PackageProvider NuGet -Force | Out-Null
}

Install-Module -Name Az.Resources -Force -AllowClobber
Import-Module -Name Az.Resources
}
Expand Down Expand Up @@ -1082,7 +1090,15 @@ param(
$registrationOutput = New-Object -TypeName PSObject
$operationStatus = [OperationStatus]::Unused

Install-PackageProvider NuGet -Force | Out-Null
try
{
Import-PackageProvider -Name Nuget -MinimumVersion "2.8.5.201" -ErrorAction Stop
}
catch
{
Install-PackageProvider NuGet -Force | Out-Null
}

$latestModule = Find-Module -Name Az.StackHCI -ErrorAction Ignore
$installedModule = Get-Module -Name Az.StackHCI | Sort-Object -Property Version -Descending | Select-Object -First 1

Expand Down