Created
July 30, 2019 10:24
-
-
Save win2000b/9b12d199551993b202bacd140e6f58ee to your computer and use it in GitHub Desktop.
Get ASR Vault Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dnsname = "Whatever" | |
$dt = $(Get-Date).ToString("M-d-yyyy") | |
$cert = New-SelfSignedCertificate -DnsName $dnsname | |
$certficate = [Convert]::ToBase64String($cert.RawData) | |
$VaultFile = Get-AzRecoveryServicesVaultSettingsFile -SiteRecovery -Vault $vault -Certificate $certficate.ToString() | |
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $VaultFile.FilePath | |
$cert | Remove-Item |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment