我正在为客户编写脚本,但 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/