Skip to content

Commit 593ba9a

Browse files
author
Alexander (Sasha) Nosov
committed
Removed az login as CLI is not used in the script
1 parent bd62ed4 commit 593ba9a

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

samples/manage/azure-arc-enabled-sql-server/modify-license-type/modify-arc-sql-license-type.ps1

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,6 @@ function Connect-Azure {
123123
}
124124
Write-Output "Connected to Azure PowerShell as: $($ctx.Account)"
125125

126-
# 3) Sync Azure CLI if available
127-
if (Get-Command az -ErrorAction SilentlyContinue) {
128-
Write-Output "Running az login..."
129-
if ($UseManagedIdentity -or $envType -eq 'AzureAutomation') {
130-
az login --tenant $TenantId --identity | Out-Null
131-
}
132-
else {
133-
az login --tenant $TenantId | Out-Null
134-
}
135-
$acct = az account show --output json | ConvertFrom-Json
136-
}
137-
Write-Output "Azure CLI logged in as: $($acct.user.name)"
138-
139126
}
140127

141128

0 commit comments

Comments
 (0)