|
372 | 372 | </maml:introduction>
|
373 | 373 | <dev:code>
|
374 | 374 | PS C:\>$KeyOperations = "decrypt", "verify"
|
375 |
| - PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime() |
376 |
| - PS C:\> $NotBefore=(Get-Date).ToUniversalTime() |
377 |
| - PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITHsmNonDefault" -Destination "HSM" -Expires $Expires -NotBefore $NotBefore -KeyOps $KeyOperations -Disable |
| 375 | +PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime() |
| 376 | +PS C:\> $NotBefore=(Get-Date).ToUniversalTime() |
| 377 | +PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITHsmNonDefault" -Destination "HSM" -Expires $Expires -NotBefore $NotBefore -KeyOps $KeyOperations -Disable |
378 | 378 | </dev:code>
|
379 | 379 | <dev:remarks>
|
380 | 380 | <maml:para>The first command stores the values decrypt and verify in the $KeyOperations variable.</maml:para>
|
|
412 | 412 | </maml:introduction>
|
413 | 413 | <dev:code>
|
414 | 414 | PS C:\>$Password = ConvertTo-SecureString -String "password" -AsPlainText -Force
|
415 |
| - PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITPfx" -KeyFilePath "C:\Contoso\ITPfx.pfx" -KeyFilePassword $Password |
| 415 | +PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITPfx" -KeyFilePath "C:\Contoso\ITPfx.pfx" -KeyFilePassword $Password |
416 | 416 | </dev:code>
|
417 | 417 | <dev:remarks>
|
418 | 418 | <maml:para>The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then stores that string in the $Password variable. For more information, type Get-Help ConvertTo-SecureString.</maml:para>
|
|
431 | 431 | </maml:introduction>
|
432 | 432 | <dev:code>
|
433 | 433 | PS C:\>$Password = ConvertTo-SecureString -String "password" -AsPlainText -Force
|
434 |
| - PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime() |
435 |
| - PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITPfxToHSM" -Destination "HSM" -KeyFilePath "C:\Contoso\ITPfx.pfx" -KeyFilePassword $Password -Expires $Expires |
| 434 | +PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime() |
| 435 | +PS C:\> Add-AzureKeyVaultKey -VaultName "Contoso" -Name "ITPfxToHSM" -Destination "HSM" -KeyFilePath "C:\Contoso\ITPfx.pfx" -KeyFilePassword $Password -Expires $Expires |
436 | 436 | </dev:code>
|
437 | 437 | <dev:remarks>
|
438 | 438 | <maml:para>The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then stores that string in the $Password variable. </maml:para>
|
|
1401 | 1401 | </maml:introduction>
|
1402 | 1402 | <dev:code>
|
1403 | 1403 | PS C:\>$Expires= (Get-Date).AddYears(2).ToUniversalTime()
|
1404 |
| - PS C:\> Set-AzureKeyVaultKey -VaultName "Contoso" -Name "ITSoftware" -Expires $Expires -Enable $True |
| 1404 | +PS C:\> Set-AzureKeyVaultKey -VaultName "Contoso" -Name "ITSoftware" -Expires $Expires -Enable $True |
1405 | 1405 | </dev:code>
|
1406 | 1406 | <dev:remarks>
|
1407 | 1407 | <maml:para>The first command creates a DateTime object by using the Get-Date cmdlet. That object specifies a time two years in the future. The command stores that date in the $Expires variable. For more information, type Get-Help Get-Date.</maml:para>
|
|
1551 | 1551 | </maml:introduction>
|
1552 | 1552 | <dev:code>
|
1553 | 1553 | PS C:\>$Secret = ConvertTo-SecureString -String "password" -AsPlainText -Force
|
1554 |
| - PS C:\> Set-AzureKeyVaultSecret -VaultName "Contoso" -Name "ITSecret" -SecretValue $Secret |
| 1554 | +PS C:\> Set-AzureKeyVaultSecret -VaultName "Contoso" -Name "ITSecret" -SecretValue $Secret |
1555 | 1555 | </dev:code>
|
1556 | 1556 | <dev:remarks>
|
1557 | 1557 | <maml:para>The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then stores that string in the $Secret variable. For more information, type Get-Help ConvertTo-SecureString.</maml:para>
|
|
0 commit comments