Skip to content

Commit fd973da

Browse files
(AzureCXP) fixes MicrosoftDocs/azure-docs#340806
Removed line number 142. As `$dt = $(Get-Date).ToString("M-d-yyyy")` variable is not used and not adding value in given Powershell script.
1 parent 4c947f1 commit fd973da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/backup/backup-client-automation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ $CredsFilename = Get-AzRecoveryServicesVaultSettingsFile -Backup -Vault $Vault1
139139
In the latest Az module of PowerShell, because of underlying platform limitations, downloading the vault credentials requires a self-signed certificate. The following example shows how to provide a self-signed certificate and download the vault credentials.
140140

141141
```powershell
142-
$dt = $(Get-Date).ToString("M-d-yyyy")
142+
143143
$cert = New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -FriendlyName 'test-vaultcredentials' -subject "Windows Azure Tools" -KeyExportPolicy Exportable -NotAfter $(Get-Date).AddHours(48) -NotBefore $(Get-Date).AddHours(-24) -KeyProtection None -KeyUsage None -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2") -Provider "Microsoft Enhanced Cryptographic Provider v1.0"
144144
$certficate = [convert]::ToBase64String($cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pfx))
145145
$CredsFilename = Get-AzRecoveryServicesVaultSettingsFile -Backup -Vault $Vault -Path $CredsPath -Certificate $certficate

0 commit comments

Comments
 (0)