Skip to content

Commit ea29362

Browse files
ArieHeinsdwheeler
andauthored
Markdown and PS Styles (#11759)
* Markdown and PS Styles * Minor edits and rebase --------- Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
1 parent b88fb54 commit ea29362

11 files changed

+142
-92
lines changed

reference/7.5/Microsoft.PowerShell.Security/About/about_Certificate_Provider.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ $getChildItemSplat = @{
196196
Eku = "*Client Authentication*"
197197
}
198198
Get-ChildItem @getChildItemSplat |
199-
Where-Object {$_.SendAsTrustedIssuer -and $_.NotAfter -gt $ValidThrough }
199+
Where-Object {
200+
$_.SendAsTrustedIssuer -and $_.NotAfter -gt $ValidThrough
201+
}
200202
```
201203

202204
## Opening the Certificates MMC Snap-in
@@ -319,7 +321,7 @@ Start a remote session on the S1 computer using the `New-PSSession` cmdlet, and
319321
specify CredSSP authentication. Saves the session in the `$s` variable.
320322

321323
```powershell
322-
$s = New-PSSession S1 -Authentication CredSSP -Credential Domain01\Admin01
324+
$s = New-PSSession S1 -Authentication CredSSP -Credential Domain01\Admin01
323325
```
324326

325327
Finally, use the `Invoke-Command` cmdlet to run a `Remove-Item` command in the
@@ -597,7 +599,7 @@ Get-Help Get-ChildItem -Path cert:
597599
<!-- link references -->
598600
[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md
599601
[02]: ../../Microsoft.PowerShell.Core/About/about_Signing.md
600-
[03]: /powershell/module/pki/new-selfsignedcertificate
602+
[03]: xref:PKI.New-SelfSignedCertificate
601603
[04]: /windows-server/security/tls/what-s-new-in-tls-ssl-schannel-ssp-overview#BKMK_TrustedIssuers
602604
[05]: xref:Microsoft.PowerShell.Core.Get-Help
603605
[06]: xref:Microsoft.PowerShell.Management.Get-ChildItem

reference/7.5/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Converts a secure string to an encrypted standard string.
1818
### Secure (Default)
1919

2020
```
21-
ConvertFrom-SecureString [-SecureString] <SecureString> [[-SecureKey] <SecureString>] [<CommonParameters>]
21+
ConvertFrom-SecureString [-SecureString] <SecureString> [[-SecureKey] <SecureString>]
22+
[<CommonParameters>]
2223
```
2324

2425
### AsPlainText
@@ -47,8 +48,8 @@ key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the
4748
representation.
4849

4950
> [!NOTE]
50-
> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the
51-
> contents of a SecureString are not encrypted on non-Windows systems.
51+
> For more information about **SecureString** data protection, see
52+
> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring).
5253
5354
## EXAMPLES
5455

@@ -173,7 +174,8 @@ Accept wildcard characters: False
173174
174175
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
175176
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
176-
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
177+
-WarningAction, and -WarningVariable. For more information, see
178+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
177179
178180
## INPUTS
179181

reference/7.5/Microsoft.PowerShell.Security/ConvertTo-SecureString.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ specified key, that same key must be provided as the value of the **Key** or **S
4747
of the `ConvertTo-SecureString` cmdlet.
4848

4949
> [!NOTE]
50-
> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the
51-
> contents of a SecureString are not encrypted on non-Windows systems.
50+
> For more information about **SecureString** data protection, see
51+
> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring).
5252
5353
## EXAMPLES
5454

@@ -86,13 +86,14 @@ variable.
8686
The fourth command displays the encrypted string in the value of the `$Encrypted` variable.
8787

8888
The fifth command uses the `ConvertTo-SecureString` cmdlet to convert the encrypted standard string
89-
in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` variable.
90-
The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates that
91-
the command was successful.
89+
in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2`
90+
variable. The sixth command displays the value of the `$Secure2` variable. The SecureString type
91+
indicates that the command was successful.
9292

9393
### Example 2: Create a secure string from an encrypted string in a file
9494

95-
This example shows how to create a secure string from an encrypted standard string that is saved in a file.
95+
This example shows how to create a secure string from an encrypted standard string that is saved in
96+
a file.
9697

9798
```powershell
9899
$Secure = Read-Host -AsSecureString

reference/7.5/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<
3838
> **This cmdlet is only available on the Windows platform.**
3939
4040
The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a
41-
file or file content as a byte array.
42-
If the file is both embedded signed and Windows catalog signed,
43-
the Windows catalog signature is used.
44-
If the file is not signed, the information is retrieved, but
45-
the fields are blank.
41+
file or file content as a byte array. If the file is both embedded signed and Windows catalog
42+
signed, the Windows catalog signature is used. If the file is not signed, the information is
43+
retrieved, but the fields are blank.
4644

4745
## EXAMPLES
4846

@@ -62,12 +60,14 @@ Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1
6260
```
6361

6462
This command gets information about the Authenticode signature for the four files listed at the
65-
command line. In this example, the name of the **FilePath** parameter, which is optional, is omitted.
63+
command line. In this example, the name of the **FilePath** parameter, which is optional, is
64+
omitted.
6665

6766
### Example 3: Get only valid Authenticode signatures for multiple files
6867

6968
```powershell
70-
Get-ChildItem $PSHOME\*.* | ForEach-object {Get-AuthenticodeSignature $_} | Where-Object {$_.status -eq "Valid"}
69+
Get-ChildItem $PSHOME\*.* | ForEach-Object {Get-AuthenticodeSignature $_} |
70+
Where-Object {$_.Status -eq "Valid"}
7171
```
7272

7373
This command lists all of the files in the `$PSHOME` directory that have a valid Authenticode
@@ -87,7 +87,11 @@ selects only the signature objects with a status of Valid.
8787
### Example 4: Get the Authenticode signature for a file content specified as byte array
8888

8989
```powershell
90-
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePathorExtension ps1
90+
$authenticodeSignatureParams = @{
91+
Content = (Get-Content foo.ps1 -AsByteStream)
92+
SourcePathorExtension = "ps1"
93+
}
94+
Get-AuthenticodeSignature @authenticodeSignatureParams
9195
```
9296

9397
This command gets information about the Authenticode signature for the content of a file. In this
@@ -172,7 +176,7 @@ Accept wildcard characters: False
172176
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
173177
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
174178
-WarningAction, and -WarningVariable. For more information, see
175-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
179+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
176180
177181
## INPUTS
178182

reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ the **Credential** parameter.
5959
### Example 2
6060

6161
```powershell
62-
$c = Get-Credential -credential User01
62+
$c = Get-Credential -Credential User01
6363
$c.Username
6464
User01
6565
```
@@ -73,7 +73,8 @@ object.
7373
### Example 3
7474

7575
```powershell
76-
$Credential = $host.ui.PromptForCredential("Need credentials", "Please enter your user name and password.", "", "NetBiosUserName")
76+
$Credential = $host.ui.PromptForCredential(
77+
"Need credentials", "Please enter your user name and password.", "", "NetBiosUserName")
7778
```
7879

7980
This command uses the **PromptForCredential** method to prompt the user for their user name and
@@ -84,7 +85,7 @@ use **PromptForCredential**, you can specify the caption, messages, and user nam
8485
prompt.
8586

8687
For more information, see the
87-
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
88+
[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A)
8889
documentation in the SDK.
8990

9091
### Example 4
@@ -95,7 +96,11 @@ This example demonstrates how to create a credential object identical to the one
9596
```powershell
9697
$User = "Domain01\User01"
9798
$PWord = Read-Host -Prompt 'Enter a Password' -AsSecureString
98-
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
99+
$credentialParams = @{
100+
TypeName = 'System.Management.Automation.PSCredential'
101+
ArgumentList = $User, $PWord
102+
}
103+
$Credential = New-Object @credentialParams
99104
```
100105

101106
The first command assigns the username to the `$User` variable. Ensure the value follows
@@ -111,7 +116,11 @@ stored in the `$User` and `$PWord` variables.
111116
### Example 5
112117

113118
```powershell
114-
Get-Credential -Message "Credential are required for access to the \\Server1\Scripts file share." -User Server01\PowerUser
119+
$credentialParams = @{
120+
Message = "Credential are required for access to the \\Server1\Scripts file share."
121+
UserName = "Server01\PowerUser"
122+
}
123+
Get-Credential @credentialParams
115124
```
116125

117126
```Output
@@ -127,13 +136,14 @@ user why credentials are needed and gives them confidence that the request is le
127136
### Example 6
128137

129138
```powershell
130-
Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02}
139+
Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Credential Domain01\User02}
131140
```
132141

133142
```Output
134143
PowerShell Credential Request : PowerShell Credential Request
135-
Warning: This credential is being requested by a script or application on the SERVER01 remote computer.
136-
Enter your credentials only if you trust the remote computer and the application or script requesting it.
144+
Warning: This credential is being requested by a script or application on the SERVER01 remote
145+
computer. Enter your credentials only if you trust the remote computer and the application or script
146+
requesting it.
137147
138148
Enter your credentials.
139149
Password for user Domain01\User02: ***************
@@ -162,12 +172,12 @@ this parameter, you're prompted for a user name and a password.
162172
Starting in PowerShell 3.0, if you enter a user name without a domain, `Get-Credential` no longer
163173
inserts a backslash before the name.
164174

165-
Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential)
166-
object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring).
175+
Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) object
176+
and the password is stored as a [SecureString](xref:System.Security.SecureString).
167177

168178
> [!NOTE]
169179
> For more information about **SecureString** data protection, see
170-
> [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring).
180+
> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring).
171181
172182
```yaml
173183
Type: System.Management.Automation.PSCredential
@@ -268,4 +278,4 @@ and `New-PSDrive` cmdlets.
268278

269279
## RELATED LINKS
270280

271-
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
281+
[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A)

reference/7.5/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ To display the execution policies for each scope in the order of precedence, use
3030
The effective execution policy is determined by execution policies that are set by
3131
`Set-ExecutionPolicy` and Group Policy settings.
3232

33-
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
33+
For more information, see
34+
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
3435

3536
## EXAMPLES
3637

@@ -232,7 +233,7 @@ whether scripts must be digitally signed before they are run.
232233

233234
## RELATED LINKS
234235

235-
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
236+
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
236237

237238
[about_Group_Policy_Settings](../Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md)
238239

reference/7.5/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ Sets the PowerShell execution policies for Windows computers.
7373

7474
### [Test-FileCatalog](Test-FileCatalog.md)
7575

76-
Validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity.
76+
Validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual
77+
files in order to validate their authenticity.
7778

7879
### [Unprotect-CmsMessage](Unprotect-CmsMessage.md)
7980

0 commit comments

Comments
 (0)