Set-AzureSiteRecoveryProtectionEntity
Hiermee stelt u de status voor een Site Recovery-beveiligingsentiteit in.
Notitie
De cmdlets waarnaar in deze documentatie wordt verwezen, zijn bedoeld voor het beheren van verouderde Azure-resources die gebruikmaken van Service Management-API's. Zie de Az PowerShell-module voor cmdlets voor het beheren van Azure Resource Manager-resources.
Syntax
Set-AzureSiteRecoveryProtectionEntity
-ProtectionEntity <ASRProtectionEntity>
[-ProtectionProfile <ASRProtectionProfile>]
-Protection <String>
[-OSDiskName <String>]
[-OS <String>]
[-WaitForCompletion]
[-Force]
[-Profile <AzureSMProfile>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzureSiteRecoveryProtectionEntity
-Id <String>
-ProtectionContainerId <String>
[-ProtectionProfile <ASRProtectionProfile>]
-Protection <String>
[-OSDiskName <String>]
[-OS <String>]
[-WaitForCompletion]
[-Force]
[-Profile <AzureSMProfile>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
De cmdlet Set-AzureSiteRecoveryProtectionEntity schakelt beveiliging in of uit op een Azure Site Recovery-beveiligingsentiteit.
Voorbeelden
Voorbeeld 1: Beveiliging inschakelen voor objecten in een container
PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer -Name "Cloud17"
PS C:\> $ProtectionEntity = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $ProtectionContainer -Name "VM01"
PS C:\> Set-AzureSiteRecoveryProtectionEntity -ProtectionEntity $ ProtectionEntity -Protection Enable -ProtectionProfile $ProtectionContainer.AvailableProtectionProfiles[0] -OS Windows
Met de eerste opdracht worden containers voor de huidige Azure Site-kluis opgehaald met behulp van de cmdlet Get-AzureSiteRecoveryProtectionContainer en slaat deze vervolgens op in de variabele $ProtectionContainer.
De tweede opdracht haalt de beveiligde virtuele machines op die deel uitmaken van de container die is opgeslagen in $ProtectionContainer met behulp van de cmdlet Get-AzureSiteRecoveryProtectionEntity . Met de opdracht worden de resultaten opgeslagen in de $ProtectionEntity variabele.
Met de laatste opdracht kunt u beveiliging inschakelen voor de entiteiten die zijn opgeslagen in $ProtectionEntity.
Parameters
-Confirm
Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Hiermee dwingt u de opdracht uit te voeren zonder dat u om bevestiging van de gebruiker wordt gevraagd.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Hiermee geeft u de id op van een beveiligde virtuele machine waarvoor beveiliging moet worden in- of uitgeschakeld.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OS
Hiermee geeft u het type besturingssysteem. De acceptabele waarden voor deze parameter zijn:
- Windows
- Linux
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OSDiskName
Hiermee geeft u de naam van de schijf die het besturingssysteem bevat.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Hiermee geeft u het Azure-profiel op waaruit deze cmdlet wordt gelezen. Als u geen profiel opgeeft, leest deze cmdlet uit het lokale standaardprofiel.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Protection
Hiermee geeft u op of beveiliging moet worden ingeschakeld of uitgeschakeld. De acceptabele waarden voor deze parameter zijn:
- Enable
- Disable
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionContainerId
Hiermee geeft u de id van een beveiligde container. Met deze cmdlet kunt u beveiliging in- of uitschakelen voor een virtuele machine die deel uitmaakt van de container die door deze parameter wordt opgegeven.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionEntity
Hiermee geeft u het object van de beveiligingsentiteit op.
Type: | ASRProtectionEntity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ProtectionProfile
Hiermee geeft u een beveiligingsprofiel op om beveiliging in te schakelen. Geef een ASRProtectionProfile-object op dat een van de beschikbare beveiligingsprofielen in de bijbehorende beveiligingscontainer is.
Type: | ASRProtectionProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WaitForCompletion
Geeft aan dat de cmdlet wacht tot de bewerking is voltooid voordat het besturingselement wordt geretourneerd naar de Windows PowerShell-console.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |