[如何使用AzureRM cmdlet删除存储帐户容器(blob),并且我的Power Shell版本为5.1

问题描述 投票:0回答:1

我尝试使用以下命令删除存储帐户:

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
azure powershell azure-powershell powershell-5.0
1个回答
0
投票

如果有Enable-AzureRmAlias,请在运行Remove-AzureRmStorageContainer之前尝试运行upgraded to new Azure Powershell Az module cmdlet。此cmdlet通过别名启用兼容模式,以允许您使用现有的脚本进行最少的修改,同时努力完全迁移到Az。有关更多详细信息,请参见Migrate existing scripts to Az

© www.soinside.com 2019 - 2024. All rights reserved.