azure - 如何从 Azure Site Recover 获取所有受保护项目的详细信息
问题描述
我正在为我的客户编写脚本,但似乎 ASR PowerShell 模块无法正常工作。
我需要通过 PowerShell 连接到 Azure 并获取受保护项目的列表。(复制项目)。
有人试过这样做吗?我尝试使用 Az 和 AzureRM 模块。
解决方案
请注意, AzureRM PowerShell 模块的所有版本都已过时,但并未失去支持。Az PowerShell 模块现在是推荐用于与 Azure 交互的 PowerShell 模块。
不过,这里是来自两个模块的 cmdlet:
Get-AzureRmSiteRecoveryReplicationProtectedItem
-ProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzRecoveryServicesAsrReplicationProtectedItem
-ProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
推荐阅读
- javascript - React:如何测试使用 ref 的组件输入?
- azure - Azure 函数的托管标识是否可以跨多个订阅进行访问?
- python - 数据框列的条形图按另一列的标准拆分
- javascript - 我想通过 Javascript/Google App 脚本中的 API 响应向用户发送电子邮件?
- php - 选择 XML 中的特定节点(循环)
- ios - iOS App - 在用户选择的浏览器中打开网站
- opencv - 如何找到图像中的点?
- git - 文件名的最大字符,包括 git 中支持的路径
- c# - 列表的下拉列表
在 ASP.NET MVC 中 - python - Python pandas数据框:是否可以在数据框中有不同列数的行(列长)