Skip to content

Commit cb095ea

Browse files
BladeFireLightSean Wheeler
authored andcommitted
Update Example 1 of Protect-CmsMessage (#1987)
The existing example did not specify you needed to create the INF. This not only says so but does so using a script block piped to out-file
1 parent c454e5d commit cb095ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ For an example of a certificate that would work for document encryption, see Exa
5050

5151
### Example 1: Create a certificate for encrypting content
5252
```
53-
PS C:\> [Version]
53+
PS C:\> # Create .INF file for certreq
54+
55+
PS C:\> {[Version]
5456
Signature = "$Windows NT$"
5557
5658
[Strings]
@@ -71,8 +73,9 @@ ValidityPeriodUnits = "1000"
7173
7274
[Extensions]
7375
%szOID_ENHANCED_KEY_USAGE% = "{text}%szOID_DOCUMENT_ENCRYPTION%"
76+
} | Out-File -FilePath DocumentEncryption.inf
7477
75-
After you have created your certificate file, run the following command to add the certificate file to the certificate store.Now you are ready to encrypt and decrypt content with the next two examples.
78+
# After you have created your certificate file, run the following command to add the certificate file to the certificate store.Now you are ready to encrypt and decrypt content with the next two examples.
7679
PS C:\> Certreq -new DocumentEncryption.inf DocumentEncryption.cer
7780
```
7881

0 commit comments

Comments
 (0)