在Azure中国区使用PowerShell命令存取及访问Storage时需要注意AzureStorageContext的-Environment参数设置
???????????PowerShell???????????Azure Storage?,???????????????,??????????????????????
Azure PowerShell????????Azure Storage????????,?????Azure????,??Table, Blob, Queue,??????Preview???FileShare,?????????????????:
- New-AzureStorageTable
- New-AzureStorageDirectory
- New-AzureStorageContainer
- New-AzureStorageQueue
- New-AzureStorageShare
??????,??????????,??????????context??,?AzureStorageContext?
??,??New-AzureStorageContainer??????container,??????:
New-AzureStorageContainer -Name $containername -Context $context -Permission Off
??-Environment??,????AzureCloud,?????????Azure??????????????:
$context = New-AzureStorageContext -StorageAccountName $storagename -StorageAccountKey $key1
????context??????,??????????:
??????,??????Blob?Table?Queue????????EndPoint,????Blob,?????:https://{storageAccountName}.blob.core.windows.net/?????????Azure???URL???
?????,????-Environment???:AzureChinaCloud???????:
$context = New-AzureStorageContext -StorageAccountName $storagename -StorageAccountKey $key1 -environment "AzureChinaCloud"
?????context??,??:
???Blob?Table?Queue??EndPoint????????core.chinacloudapi.cn,??Blob,??????:https://{storageAccountName}.blob.core.chinacloudapi.cn?
??????????Azure????Storage??
????AzureStorageContext?????,???:
https://msdn.microsoft.com/en-us/library/azure/dn495246.aspx