azure - 如何从 Azure Site Recover 获取所有 protected 项目及其详细信息

标签 azure powershell azure-powershell azure-site-recovery

我正在为客户编写脚本,但 ASR PowerShell 模块似乎无法正常工作。

我需要通过 PowerShell 连接到 Azure 并获取 protected 项目的列表。 (重复项目)。

有人尝试这样做吗?我尝试使用 Az 和 AzureRM 模块。

最佳答案

请注意,AzureRM PowerShell 模块的所有版本均已过时,但并未失去支持。 Az PowerShell 模块现在是推荐用于与 Azure 交互的 PowerShell 模块。

尽管如此,以下是两个模块的 cmdlet:

Get-AzureRmSiteRecoveryReplicationProtectedItem
   -ProtectionContainer <ASRProtectionContainer>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesAsrReplicationProtectedItem
   -ProtectionContainer <ASRProtectionContainer>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

关于azure - 如何从 Azure Site Recover 获取所有 protected 项目及其详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62327894/

相关文章:

给定多个 -Filters 的 powershell Get-ChildItem

azure - 如何在 Azure 中自动部署机器人 channel 注册?

azure - 使用客户的 Active Directory(Azure 或 ADFS)对 UWP 客户端和 .Net Core Web 应用程序进行身份验证

azure - 如何在 Kubernetes (AKS) 中使用 Helm 注释 Ingress Controller 的 Pod?

powershell - 将所有输出写入文件

azure - WebJobs 未通过在 powershell 脚本中使用 Rest API Post 方法来停止 - 出现错误 403 - 此 Web 应用程序已停止

azure - 使用非托管磁盘创建 Azure VM

azure - 将应用程序部署到 Azure Kubernetes 服务失败。我的全局管理员帐户缺少权限/范围

Azure Log Analytics - 比较两个消息跟踪以在其中一个更新时发出警报

powershell - 测试路径在应为true时返回false