mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Removed az login as CLI is not used in the script
This commit is contained in:
-13
@@ -123,19 +123,6 @@ function Connect-Azure {
|
||||
}
|
||||
Write-Output "Connected to Azure PowerShell as: $($ctx.Account)"
|
||||
|
||||
# 3) Sync Azure CLI if available
|
||||
if (Get-Command az -ErrorAction SilentlyContinue) {
|
||||
Write-Output "Running az login..."
|
||||
if ($UseManagedIdentity -or $envType -eq 'AzureAutomation') {
|
||||
az login --tenant $TenantId --identity | Out-Null
|
||||
}
|
||||
else {
|
||||
az login --tenant $TenantId | Out-Null
|
||||
}
|
||||
$acct = az account show --output json | ConvertFrom-Json
|
||||
}
|
||||
Write-Output "Azure CLI logged in as: $($acct.user.name)"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user