Azure Subscription change, check in CLI and powershell

Change Current Subscription.

1
2
3
4
5
6
7
$subName = ""

# powershell
Set-AzureRmContext -Subscription $subName

# azure CLI
az account set -s $subName

Show Current Subscription.

1
2
3
4
5
# azure CLI
az account show

# powershell
Get-AzureRmContext

List Available Subscription.

1
2
3
4
5
# azure CLI
az account list

# powershell
Get-AzureRmContext -ListAvailable
Share