< Back

Set-AzureRmRecoveryServicesAsrVaultContext

Tue Jan 29, 2019 10:03 pm

NAME Set-AzureRmRecoveryServicesAsrVaultContext



SYNOPSIS

Sets the Recovery Services vault context to be used for subsequent Azure Site Recovery operations in the current PowerShell session.





SYNTAX

Set-AzureRmRecoveryServicesAsrVaultContext [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Vault <ARSVault> [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-AzureRmRecoveryServicesAsrVaultContext cmdlet sets the Azure Site Recovery vault context for further operations.





PARAMETERS

-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Vault <ARSVault>

The Recovery Services vault object corresponding to the Recovery Services vault.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.RecoveryServices.ARSVault







OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRVaultSettings







NOTES









Example 1



PS C:\\> $vaultSettings = Set-AzureRmRecoveryServicesAsrVaultContext -Vault $RecoveryServicesVault



Sets the vault context to the specified Recovery Services vault for subsequent Azure Site Recovery operations in the current PowerShell session.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ultcontext