Get-AzureSiteRecoveryVM
Mendapatkan informasi tentang komputer virtual yang dikelola 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-AzureSiteRecoveryVM
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryVM
-Id <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryVM
-Id <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryVM
-Name <String>
-ProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryVM
-Name <String>
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Get-AzureSiteRecoveryVM
-ProtectionContainerId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Deskripsi
Cmdlet Get-AzureSiteRecoveryVM mendapatkan informasi tentang komputer virtual yang dikelola di Azure Site Recovery.
Contoh
Contoh 1: Mendapatkan informasi tentang komputer virtual
PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> Get-AzureSiteRecoveryVM -ProtectionContainer $ProtectionContainer
ID : a205fd17-3848-4896-bab6-9dbccc3cd8ed
ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c
ProtectionContainerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc
Name : vm1
Type : VirtualMachine
FabricObjectId : 86447b9e-d877-4e9a-8302-adcd6bbf18c0
Protected : False
CanCommit : False
CanFailover : True
CanReverseReplicate : False
ActiveLocation : Primary
ProtectionState : Enabled
ReplicationHealth : Healthy
TestFailoverState : None
ReplicationProvider : HyperVReplica
Perintah pertama menggunakan cmdlet Get-AzureSiteRecoveryProtectionContainer untuk mendapatkan kontainer yang dilindungi, lalu menyimpannya dalam variabel $ProtectionContainer.
Perintah kedua mendapatkan informasi tentang komputer virtual di $ProtectionContainer.
Parameter
-Id
Menentukan ID komputer virtual yang akan mendapatkan informasi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Name
Menentukan nama komputer virtual.
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 objek kontainer perlindungan Site Recovery.
Jenis: | ASRProtectionContainer |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-ProtectionContainerId
Menentukan ID kontainer yang dilindungi untuk mendapatkan informasi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |