Skip to content

Commit ebd9e7f

Browse files
authored
Markdown and PS Styles (#11715)
1 parent 574e6df commit ebd9e7f

21 files changed

+248
-194
lines changed

reference/7.5/Microsoft.PowerShell.Core/About/about_Data_Files.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ the commands and variables that can be used.
4848

4949
For more information, see [about_Language_Modes][02].
5050

51-
Originally, localized data files were meant to be used to store string data that
52-
could be translated into other languages. This allowed your scripts to import
53-
the data to provide localized string output in other languages. However, you
54-
aren't limited to storing string data and don't have to use the data for
51+
Originally, localized data files were meant to be used to store string data
52+
that could be translated into other languages. This allowed your scripts to
53+
import the data to provide localized string output in other languages. However,
54+
you aren't limited to storing string data and don't have to use the data for
5555
localized output.
5656

5757
The data in the file isn't limited to hashtables. It can be in any format

reference/7.5/Microsoft.PowerShell.Core/About/about_Data_Sections.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ DATA -supportedCommand Format-Xml
9898

9999
### Using a `DATA` Section
100100

101-
To use the content of a `DATA` section, assign it to a variable and use variable
102-
notation to access the content.
101+
To use the content of a `DATA` section, assign it to a variable and use
102+
variable notation to access the content.
103103

104104
For example, the following `DATA` section contains a `ConvertFrom-StringData`
105105
command that converts the here-string into a hash table. The hash table is
@@ -173,7 +173,7 @@ A single-quoted here-string that uses the `ConvertFrom-StringData` cmdlet:
173173

174174
```powershell
175175
DATA {
176-
ConvertFrom-StringData -stringdata @'
176+
ConvertFrom-StringData -StringData @'
177177
Text001 = Windows 7
178178
Text002 = Windows Server 2008 R2
179179
'@
@@ -184,7 +184,7 @@ A double-quoted here-string that uses the `ConvertFrom-StringData` cmdlet:
184184

185185
```powershell
186186
DATA {
187-
ConvertFrom-StringData -stringdata @"
187+
ConvertFrom-StringData -StringData @"
188188
Msg1 = To start, press any key.
189189
Msg2 = To exit, type "quit".
190190
"@
@@ -195,7 +195,7 @@ A data section that includes a user-written cmdlet that generates data:
195195

196196
```powershell
197197
DATA -supportedCommand Format-XML {
198-
Format-Xml -strings string1, string2, string3
198+
Format-Xml -Strings string1, string2, string3
199199
}
200200
```
201201

reference/7.5/Microsoft.PowerShell.Core/About/about_Debuggers.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ For example, the following command gets the variables in the local (script)
192192
scope:
193193

194194
```powershell
195-
Get-Variable -scope 0
195+
Get-Variable -Scope 0
196196
```
197197

198198
This is a useful way to see only the variables that you defined in the script
@@ -225,17 +225,17 @@ For example:
225225
```powershell
226226
function test-cmdlet {
227227
begin {
228-
write-output "Begin"
228+
Write-Output "Begin"
229229
}
230230
process {
231-
write-output "Process"
231+
Write-Output "Process"
232232
}
233233
end {
234-
write-output "End"
234+
Write-Output "End"
235235
}
236236
}
237237
238-
C:\PS> Set-PSBreakpoint -command test-cmdlet
238+
C:\PS> Set-PSBreakpoint -Command test-cmdlet
239239
240240
C:\PS> test-cmdlet
241241
@@ -285,7 +285,7 @@ identifying changes to the prompt:
285285

286286
```powershell
287287
Enter-PSSession -Cn localhost
288-
[localhost]: PS C:\psscripts> Set-PSBreakpoint .\ttest19.ps1 6,11,22,25
288+
[localhost]: PS C:\psscripts> Set-PSBreakpoint .\ttest19.ps1 6, 11, 22, 25
289289
290290
ID Script Line Command Variable Action
291291
-- ------ ---- ------- -------- ------
@@ -367,7 +367,7 @@ Start by creating a line breakpoint on the first line of the Test.ps1 script in
367367
the current directory.
368368

369369
```powershell
370-
PS C:\ps-test> Set-PSBreakpoint -line 1 -script test.ps1
370+
PS C:\ps-test> Set-PSBreakpoint -Line 1 -Script test.ps1
371371
```
372372

373373
The command returns a **System.Management.Automation.LineBreakpoint** object.
@@ -482,7 +482,7 @@ reuse the breakpoint, use the `Disable-PsBreakpoint` cmdlet instead of
482482
`Remove-PsBreakpoint`.)
483483

484484
```powershell
485-
PS C:\ps-test> Get-PSBreakpoint| Remove-PSBreakpoint
485+
PS C:\ps-test> Get-PSBreakpoint | Remove-PSBreakpoint
486486
```
487487

488488
You can abbreviate this command as:
@@ -501,13 +501,13 @@ function delbr { gbp | rbp }
501501
Now, create a breakpoint on the `$scriptname` variable.
502502

503503
```powershell
504-
PS C:\ps-test> Set-PSBreakpoint -variable scriptname -script test.ps1
504+
PS C:\ps-test> Set-PSBreakpoint -Variable scriptname -Script test.ps1
505505
```
506506

507507
You can abbreviate the command as:
508508

509509
```powershell
510-
PS C:\ps-test> sbp -v scriptname -s test.ps1
510+
PS C:\ps-test> sbp -V scriptname -S test.ps1
511511
```
512512

513513
Now, start the script. The script reaches the variable breakpoint. The default
@@ -557,8 +557,8 @@ Have you run a background job today (start-job)?
557557
test.ps1:13 "Done $scriptName"
558558
```
559559

560-
The `StepOver` command executes the function, and it previews the next statement
561-
in the script, which prints the final line.
560+
The `StepOver` command executes the function, and it previews the next
561+
statement in the script, which prints the final line.
562562

563563
Use a `Stop` command (`t`) to exit the debugger. The command prompt reverts to
564564
the standard command prompt.
@@ -571,19 +571,19 @@ To delete the breakpoints, use the `Get-PsBreakpoint` and `Remove-PsBreakpoint`
571571
cmdlets.
572572

573573
```powershell
574-
PS C:\ps-test> Get-PSBreakpoint| Remove-PSBreakpoint
574+
PS C:\ps-test> Get-PSBreakpoint | Remove-PSBreakpoint
575575
```
576576

577577
Create a new command breakpoint on the `psversion` function.
578578

579579
```powershell
580-
PS C:\ps-test> Set-PSBreakpoint -command psversion -script test.ps1
580+
PS C:\ps-test> Set-PSBreakpoint -Command psversion -Script test.ps1
581581
```
582582

583583
You can abbreviate this command to:
584584

585585
```powershell
586-
PS C:\ps-test> sbp -c psversion -s test.ps1
586+
PS C:\ps-test> sbp -C psversion -S test.ps1
587587
```
588588

589589
Now, run the script.
@@ -612,7 +612,7 @@ Windows PowerShell 2.0
612612
Have you run a background job today (start-job)?
613613
Done C:\ps-test\test.ps1
614614
615-
PS C:\ps-test> Get-PSBreakpoint| Remove-PSBreakpoint
615+
PS C:\ps-test> Get-PSBreakpoint | Remove-PSBreakpoint
616616
PS C:\ps-test>
617617
```
618618

@@ -623,9 +623,9 @@ the action, execution doesn't stop. The backtick (`` ` ``) is the
623623
line-continuation character.
624624

625625
```powershell
626-
PS C:\ps-test> Set-PSBreakpoint -command psversion -script test.ps1 `
627-
-action { add-content "The value of `$scriptName is $scriptName." `
628-
-path action.log}
626+
PS C:\ps-test> Set-PSBreakpoint -Command psversion -Script test.ps1 `
627+
-Action { Add-Content "The value of `$scriptName is $scriptName." `
628+
-Path action.log}
629629
```
630630

631631
You can also add actions that set conditions for the breakpoint. In the
@@ -634,8 +634,8 @@ policy is set to RemoteSigned, the most restrictive policy that still permits
634634
you to run scripts.
635635

636636
```powershell
637-
PS C:\ps-test> Set-PSBreakpoint -script test.ps1 -command psversion `
638-
-action { if ((Get-ExecutionPolicy) -eq "RemoteSigned") { break }}
637+
PS C:\ps-test> Set-PSBreakpoint -Script test.ps1 -Command psversion `
638+
-Action { if ((Get-ExecutionPolicy) -eq "RemoteSigned") { break }}
639639
```
640640

641641
The `break` keyword in the action directs the debugger to execute the
@@ -700,7 +700,7 @@ features that you can use to debug scripts and functions.
700700

701701
<!-- link references -->
702702
[01]: /powershell/scripting/dev-cross-plat/vscode/using-vscode#debugging-with-visual-studio-code
703-
[02]: about_prompts.md
703+
[02]: about_Prompts.md
704704
[05]: xref:Microsoft.PowerShell.Utility.Disable-PSBreakpoint
705705
[06]: xref:Microsoft.PowerShell.Utility.Enable-PSBreakpoint
706706
[07]: xref:Microsoft.PowerShell.Utility.Get-PSBreakpoint

reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Provider.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Provides access to the Windows environment variables.
2626

2727
## Detailed description
2828

29-
The PowerShell **Environment** provider lets you get, add, change, clear, and delete environment
30-
variables and values in PowerShell.
29+
The PowerShell **Environment** provider lets you get, add, change, clear, and
30+
delete environment variables and values in PowerShell.
3131

3232
**Environment** variables are dynamically named variables that describe the
3333
environment in which your programs run. Windows and PowerShell use environment
@@ -42,19 +42,18 @@ have no child items.
4242
The **Environment** provider supports the following cmdlets, which are covered
4343
in this article.
4444

45-
- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location)
46-
- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location)
47-
- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item)
48-
- [New-Item](xref:Microsoft.PowerShell.Management.New-Item)
49-
- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item)
50-
- [Clear-Item](xref:Microsoft.PowerShell.Management.Clear-Item)
45+
- [Get-Location][01]
46+
- [Set-Location][02]
47+
- [Get-Item][03]
48+
- [New-Item][04]
49+
- [Remove-Item][05]
50+
- [Clear-Item][06]
5151

5252
## Types exposed by this provider
5353

5454
Each environment variable is an instance of the
55-
[System.Collections.DictionaryEntry](/dotnet/api/system.collections.dictionaryentry)
56-
class. The name of the variable is the dictionary key. The value of the
57-
environment variable is the dictionary value.
55+
[System.Collections.DictionaryEntry][07] class. The name of the variable is the
56+
dictionary key. The value of the environment variable is the dictionary value.
5857

5958
## Navigating the Environment drive
6059

@@ -75,10 +74,11 @@ Set-Location C:
7574
```
7675

7776
You can also work with the **Environment** provider from any other PowerShell
78-
drive. To reference an environment variable from another location, use the drive name `Env:` in the path.
77+
drive. To reference an environment variable from another location, use the
78+
drive name `Env:` in the path.
7979

80-
The **Environment** provider also exposes environment variables using a variable
81-
prefix of `$env:`. The following command views the contents of the
80+
The **Environment** provider also exposes environment variables using a
81+
variable prefix of `$env:`. The following command views the contents of the
8282
**ProgramFiles** environment variable. The `$env:` variable prefix can
8383
be used from any PowerShell drive.
8484

@@ -94,9 +94,8 @@ session for as long as it is active.
9494
> [!NOTE]
9595
> PowerShell uses aliases to allow you a familiar way to work with provider
9696
> paths. Commands such as `dir` and `ls` are now aliases for
97-
> [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem),
98-
> `cd` is an alias for [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location). and `pwd` is
99-
> an alias for [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location).
97+
> [Get-ChildItem][08], `cd` is an alias for [Set-Location][02] and `pwd` is
98+
> an alias for [Get-Location][01].
10099
101100
## Getting environment variables
102101

@@ -203,8 +202,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for
203202
provider cmdlets that explain how those cmdlets behave in a file system drive.
204203

205204
To get the help topics that are customized for the file system drive, run a
206-
[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file system drive or use the `-Path`
207-
parameter of [Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file system drive.
205+
[Get-Help][09] command in a file system drive or use the `-Path` parameter of
206+
[Get-Help][09] to specify a file system drive.
208207

209208
```powershell
210209
Get-Help Get-ChildItem
@@ -216,4 +215,16 @@ Get-Help Get-ChildItem -Path env:
216215

217216
## See also
218217

219-
- [about_Providers](about_Providers.md)
218+
- [about_Providers][10]
219+
220+
<!-- link references -->
221+
[01]: xref:Microsoft.PowerShell.Management.Get-Location
222+
[02]: xref:Microsoft.PowerShell.Management.Set-Location
223+
[03]: xref:Microsoft.PowerShell.Management.Get-Item
224+
[04]: xref:Microsoft.PowerShell.Management.New-Item
225+
[05]: xref:Microsoft.PowerShell.Management.Remove-Item
226+
[06]: xref:Microsoft.PowerShell.Management.Clear-Item
227+
[07]: /dotnet/api/system.collections.dictionaryentry
228+
[08]: xref:Microsoft.PowerShell.Management.Get-ChildItem
229+
[09]: xref:Microsoft.PowerShell.Core.Get-Help
230+
[10]: about_Providers.md

reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ or `NO_COLOR` environment variables.
542542

543543
- `dumb` - sets `$Host.UI.SupportsVirtualTerminal = $false`
544544
- `xterm-mono` - sets `$PSStyle.OutputRendering = PlainText`
545-
- `xtermm` - sets `$PSStyle.OutputRendering = PlainText`
545+
- `xterm` - sets `$PSStyle.OutputRendering = PlainText`
546546

547547
- `NO_COLOR`
548548

@@ -563,12 +563,12 @@ or `NO_COLOR` environment variables.
563563
[03]: #powershell-environment-variables
564564
[04]: about_Environment_Provider.md
565565
[05]: about_Execution_Policies.md
566-
[06]: about_preference_variables.md
567-
[07]: about_profiles.md
566+
[06]: about_Preference_Variables.md
567+
[07]: about_Profiles.md
568568
[08]: about_PSModulePath.md
569569
[09]: about_Telemetry.md
570570
[10]: about_Update_Notifications.md
571-
[11]: about_variables.md
571+
[11]: about_Variables.md
572572
[12]: https://no-color.org/
573573
[13]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
574574
[14]: xref:PowerShellGet.Install-Module

0 commit comments

Comments
 (0)