我尝试使用以下命令删除存储帐户:
Remove-AzureRmStorageContainer -StorageAccount $stg -ContainerName "002fc90e-dc20-40f5-bf2f-b4998c4d6a77g" -force -verbose
但是我收到以下错误:
Remove-AzureRmStorageContainer : The term '**Remove-AzureRmStorageContainer' is not recognized** as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Remove-AzureRmStorageContainer -StorageAccount $stg -ContainerName "0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Remove-AzureRmStorageContainer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
如果有Enable-AzureRmAlias
,请在运行Remove-AzureRmStorageContainer
之前尝试运行upgraded to new Azure Powershell Az module cmdlet。此cmdlet通过别名启用兼容模式,以允许您使用现有的脚本进行最少的修改,同时努力完全迁移到Az。有关更多详细信息,请参见Migrate existing scripts to Az。