azure 구독 ID 변경하기


Azure에 로그인을 하였는데, 그 이메일 계정에 구독ID가 여러개가 있으면 작업하는데 혼동이 온다. 특히 PowerShell이나 Azure Cli로 작업할 때 혼동이 온다. 다음과 같이 하여 구독 ID를 확인하고 필요한 경우 변경하도록 한다.

  1. Azure 구독 ID 목록 확인하기
    • Get-AzureRmSubscription
    • Get-AzureRmContext  (##default값 확인)
    • az account list -o table
  2. 구독 ID 변경하기(현재 값 수정)
    • Set-AzureRmContext -SubscriptionId 72d8cc8e-****-****-****-*******9  (#현재 값 수정)
    • azure account set <subscription name or ID> true

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s