azure - 如何使用 AzureRM cmdlet 删除存储帐户容器(blob),我的 power shell 版本是 5.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 Az 模块,Enable-AzureRmAlias
请在运行之前尝试运行cmdlet 。此 cmdlet 通过别名启用兼容模式,允许您使用现有脚本进行最少的修改,同时努力完全迁移到 Az。有关更多详细信息,请参阅将现有脚本迁移到 Az。Remove-AzureRmStorageContainer
推荐阅读
- reactjs - React onTransitionEnd 事件被频繁调用
- r - 从 plm 模型 (R) 中提取单个系数
- rx-java2 - 订阅后合并 Observables
- kotlin - 如何使用 RxJava2 将 api 中的数据组合到域对象中?
- php - 为什么找不到“用户”类?
- java - 在java中显示字符串的字符串数组
- javascript - 尝试为 setTimeout 淡入和淡出文本时遇到问题
- javascript - 如何使用 HTML 和 Node JS 将数据插入 MySQL?
- node.js - 从 WSS 连接(节点 js)接收数据时使用超时
- featuretools - 了解特征工具中的 PercentTrue 原始输出