diff --git a/tools/Test/SmokeTest/InstallAzModules.ps1 b/tools/Test/SmokeTest/InstallAzModules.ps1 index 8982e959a0a6..f82a55990424 100644 --- a/tools/Test/SmokeTest/InstallAzModules.ps1 +++ b/tools/Test/SmokeTest/InstallAzModules.ps1 @@ -45,7 +45,7 @@ Install-Module -Name Az -Repository $gallery -Scope CurrentUser -AllowClobber -F $file = Get-ChildItem $localRepoLocation | Where-Object {$_.Name -like "ThreadJob*"} $installedModule = Get-Module -ListAVailable -Name ThreadJob -if ($file -ne $null -and $installedModule -ne $null) { +if ($file -ne $null -and $installedModule -eq $null) { Write-Host "Install ThreadJob..." Install-Module -Name ThreadJob -Repository $gallery -Scope CurrentUser -AllowClobber -Force }