Azure管理:PowerShell与VM模板使用全解析
1. 使用PowerShell管理Azure
1.1 选择订阅与配置默认存储账户
在选择订阅后,需要配置一个默认存储账户供该订阅使用,因为部分PowerShell命令需要默认存储账户。查看可用存储账户的命令如下:
Get-AzureStorageAccount | ft Label, Location, AccountType -AutoSize示例输出如下:
| Label | Location | AccountType |
| ----------------------- | ------------ | -------------- |
| savilleastusGRS | East US | Standard_GRS |
| savilleastasiagrs | East Asia | Standard_LRS |
| savillmasterazurestore | East US | Standard_GRS |
| savtechstoreeastus | East US | Standard_GRS |
| savtechstorenortheurope | North Europe | Standard_LRS |
选择存储账户的命令为:
Set-AzureSubscription -Subscription