Get-AzureSiteRecoveryProtectionEntity
Mendapatkan entitas yang dapat dilindungi atau dilindungi di vault Site Recovery.
Catatan
Cmdlet yang dirujuk dalam dokumentasi ini adalah untuk mengelola sumber daya Azure warisan yang menggunakan API Azure Service Manager (ASM). Modul PowerShell warisan ini tidak disarankan saat membuat sumber daya baru karena ASM dijadwalkan untuk dihentikan. Untuk informasi selengkapnya, lihat Penghentian Azure Service Manager.
Modul Az PowerShell adalah modul PowerShell yang direkomendasikan untuk mengelola sumber daya Azure Resource Manager (ARM) dengan PowerShell.
Sintaks
Get-AzureSiteRecoveryProtectionEntity
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Id <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Id <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Name <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-Name <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryProtectionEntity
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Deskripsi
Cmdlet Get-AzureSiteRecoveryProtectionEntity mendapatkan entitas yang dapat dilindungi atau dilindungi, seperti komputer virtual, di vault Azure Site Recovery saat ini.
Contoh
Contoh 1: Menampilkan komputer virtual yang dilindungi dalam kontainer
PS C:\> $Container = Get-AzureSiteRecoveryProtectionContainer
PS C:\> Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $Container
ID : 43aaab46-1cb0-4c39-8077-9a091c3b05ce
ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c
ProtectionContainerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc
Name : testvm
Type : VirtualMachine
FabricObjectId : 506B3CAC-5758-49E2-98C4-E5B0512E4D8E
Protected : False
CanCommit : False
CanFailover : False
CanReverseReplicate : False
ActiveLocation : Primary
ProtectionStateDescription : Enabling protection
ReplicationHealth :
TestFailoverStateDescription : Nonev
ReplicationProvider : HyperVReplica
Perintah pertama mendapatkan kontainer yang dilindungi dengan menggunakan cmdlet Get-AzureSiteRecoveryProtectionContainer , lalu menyimpan objek tersebut dalam variabel $Container.
Perintah kedua mendapatkan komputer virtual yang dilindungi milik kontainer di $Container, lalu menampilkannya.
Parameter
-Id
Menentukan ID entitas perlindungan yang akan didapatkan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Name
Menentukan nama entitas perlindungan yang akan didapatkan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Profile
Menentukan profil Azure tempat cmdlet ini dibaca. Jika Anda tidak menentukan profil, cmdlet ini akan membaca dari profil default lokal.
Jenis: | AzureSMProfile |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ProtectionContainer
Menentukan kontainer perlindungan.
Jenis: | ASRProtectionContainer |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-ProtectionContainerId
Menentukan ID kontainer yang dilindungi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |