在Powershell中为受保护的VM同步复制状态% [英] Getting Replication status % syncronized in powershell for protected VM
问题描述
我们处于质量检查环境中,使用Azure Site Recovery测试第一个虚拟机的复制.
使用以下Powershell步骤保护VM:https://docs.microsoft.com/en-us/azure/site-recovery/vmware-azure-disaster-recovery-powershell
在Portal.azure.com上,我们可以看到复制状态的百分比.试图从Get-ASRxxxx AzureRM powershell cmds获取相同的信息,无法解决.
使用:
Get-ASRReplicationProtectedItem -ProtectionContainer $ ProtectionContainer -FriendlyName Qtest
仅相关数据为:
ProtectionState   ;: InitialReplicationInProgress
ProtectionState说明 :正在进行初始复制
如果Azure门户可以显示此信息,我们是否应该无法从Powershell中获取它?
我在该论坛上阅读了其他文章,并找到了有关资源浏览器的信息.搜索并发现数据存储在何处.
Get-AzureRmResource -ResourceGroupName *********** -ResourceType Microsoft.RecoveryServices/vaults/replicationProtectedItems -ResourceName" **********" -ApiVersion 2016-08-10 |选择对象-ExpandProperty属性|选择对象-扩展属性 providerspecificDetails
输出包含大量的数据,其中包括
resyncProgressPercentage   ;: 39
这是获取此类数据,创建使用Get-AzureRMResource的我自己的函数的唯一方法吗?
谢谢
Naim
检查此 cmdlet 它将返回类的对象,并看到此 链接 显示复制运行状况.
-------------- -------------------------------------------------- ----------------------------------
如果此答案有帮助,点击"标记为答案"或 投票.要提供有关您的论坛体验的其他反馈,请单击 在这里
We are in a QA environment testing the replication of our 1st vm using Azure Site Recovery.
Protected a VM using powershell steps that are here : https://docs.microsoft.com/en-us/azure/site-recovery/vmware-azure-disaster-recovery-powershell
On the Portal.azure.com we can see the % of the Replication Status. Trying to get the same info from the Get-ASRxxxx AzureRM powershell cmds, can't figure this out.
Using :
Get-ASRReplicationProtectedItem -ProtectionContainer $ProtectionContainer -FriendlyName Qtest
only relevant data is :
ProtectionState : InitialReplicationInProgress
ProtectionStateDescription : Initial replication is in progress
If the Azure portal can display this should we not be able to obtain it from powershell ?
I read other posts on this forum and found about the Resource Explorer. searched around and discovered where the data is stored.
Get-AzureRmResource -ResourceGroupName *********** -ResourceType Microsoft.RecoveryServices/vaults/replicationProtectedItems -ResourceName "**********" -ApiVersion 2016-08-10 | select-object -ExpandProperty Properties | Select-Object -ExpandProperty providerspecificDetails
the output contains a treasure trove of data including
resyncProgressPercentage : 39
Is this the only way to get this type of data, creating my own function that uses the Get-AzureRMResource ?
thank you
Naim
Check this cmdlets it will returns object of class and see this link which shows the replication health.
--------------------------------------------------------------------------------------------------
If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click here
这篇关于在Powershell中为受保护的VM同步复制状态%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!