diff --git a/eng/dotnetup-shared.ps1 b/eng/dotnetup-shared.ps1 index 67e01ee4aeda..420d9916f5c5 100644 --- a/eng/dotnetup-shared.ps1 +++ b/eng/dotnetup-shared.ps1 @@ -68,7 +68,8 @@ function Invoke-DotnetupNativeCommand([scriptblock]$Command) { $ErrorActionPreference = 'Continue' $PSNativeCommandUseErrorActionPreference = $false try { - & $Command + # Write command output to the host and prevent it from being returned alongside the exit code + & $Command | Out-Host return $LASTEXITCODE } catch {