Azure-docs: Get-AzRecoveryServicesVaultSettingsFile not working with parameters shown

Created on 5 Apr 2019  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

In setting the vault context, the PS line "$Vaultsettingsfile = Get-AzRecoveryServicesVaultSettingsFile -Vault $vault -SiteRecovery -Path C:\users\user\Documents\" is shown, but fails as additional parameters (e.g. -Certificate) are required. Help for this command also gives examples that error. The description for the -Certificate parameter is just "{{Fill Certificate Description}}".
Subsequent steps fail with error "Vault Settings are missing. Please import Vault Settings and verify the same".


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author product-question site-recoversvc triaged

All 9 comments

@Iain-Morris Thanks for the question! We will investigate this issue and get back to you soon.

Hello.
same problem
error Message -> Get-AzRecoveryServicesVaultSettingsFile : Parameter set cannot be resolved using the specified named parameters.

Always fails with the following error:

$CredsFileName = Get-AzRecoveryServicesVaultSettingsFile -Backup -Vault $Vault1 -Path $CredsPath -ver
bose

cmdlet Get-AzRecoveryServicesVaultSettingsFile at command pipeline position 1
Supply values for the following parameters:
Certificate: vaultCert01
Get-AzRecoveryServicesVaultSettingsFile : Error parsing NaN value. Path '', line 1, position 1.
At line:1 char:18

  • ... sFileName = Get-AzRecoveryServicesVaultSettingsFile -Backup -Vault $V ...
  • ~~~~~~~~~~~~~

    • CategoryInfo : CloseError: (:) [Get-AzRecoveryServicesVaultSettingsFile], JsonReaderException

    • FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.GetAzureRmRecoveryServicesVaultSettingsFile

Ran into same issue. Check this link https://github.com/Azure/azure-powershell/issues/8885

still broken.

Hi All,

Workarond steps to follow:
Use below cmdlet to set vault context directly
Set- AzRecoveryServicesAsrVaultContext -vault $vault
$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

@SadiqhAhmed-MSFT Thanks for the workaround, but will the docs be updated as well? (users should not be expected to find the workaround in a closed issue)

workaround doesn't seem to work as expected and the commandlet and documentation hasn't been updated over a month later. Can we get an update on the current status?

Any update on when this will be resolved? Same issue with the 2.0.0-preview version.

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeepPuddles picture DeepPuddles  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

varma31 picture varma31  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments