Remove-AzRecoveryServicesResourceGuardMapping

Deletes the resource guard mapping added to the recovery services vault.

Syntax

Remove-AzRecoveryServicesResourceGuardMapping
      [-VaultId <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-Token <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

This cmdlet deletes the mapping between the RS vault and resource guard

Examples

Example 1 Delete the resource guard mapping in a cross tenant scenario

$token = (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Token
Remove-AzRecoveryServicesResourceGuardMapping -VaultId $vault.ID  -Token $token

The first command fetches the access token for the resource guard tenant where the resource guard is present. The second command deletes the mapping between the RSVault $vault and the resource guard. Please note that token parameter is optional and only needed to authenticate cross tenant protected opeartions.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Token

Auxiliary access token for authenticating critical operation to resource guard subscription

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VaultId

ARM ID of the Recovery Services Vault.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Object