Skip to content

Commit 7f6c9ed

Browse files
Fix incorrect case/capitalization in ref docs (#11934)
This ensures the following components have the correct/consistent case throughout the reference documentation: Preference variable, PS environment variable, PS drive, PS provider, PS command name, PS command argument, PS module, PS file extension, PS host name/application, #Requires statement, parameter name, about_* topic, member name, scope modifier, keyword, operator, calculated property key/value, attribute, type accelerator, type literal/name, WMI namespace/class, variable name, special character, comment-based help keyword, product/company name, Windows drive letter/directory, Windows/Unix environment variable In addition, changes include fixes to incorrect terminology (e.g., referring to a keyword as a command) and formatting of PS syntax elements (non-exhaustive).
1 parent efb767a commit 7f6c9ed

40 files changed

+207
-207
lines changed

reference/5.1/Microsoft.PowerShell.Utility/Sort-Object.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ Get-History | Sort-Object -Property Id -Descending
131131
8 Get-Command Sort-Object -Syntax
132132
7 Get-Command Sort-Object -ShowCommandInfo
133133
6 Get-ChildItem -Path C:\Test | Sort-Object -Property Length
134-
5 Get-Help Clear-History -online
135-
4 Get-Help Clear-History -full
134+
5 Get-Help Clear-History -Online
135+
4 Get-Help Clear-History -Full
136136
3 Get-ChildItem | Get-Member
137137
2 Get-Command Sort-Object -Syntax
138138
1 Set-Location C:\Test\
@@ -478,8 +478,8 @@ use a scriptblock or a hashtable.
478478

479479
Valid keys for a hash table are as follows:
480480

481-
- `expression` - `<string>` or `<script block>`
482-
- `ascending` or `descending` - `<boolean>`
481+
- `Expression` - `<string>` or `<script block>`
482+
- `Ascending` or `Descending` - `<boolean>`
483483

484484
For more information, see
485485
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md).

reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This example gets a list of the processes running on the computer, saves them to
6767
variable, and pipes them to `Select-Object`.
6868

6969
```powershell
70-
Get-Process notepad | Tee-Object -Variable proc | Select-Object processname,handles
70+
Get-Process notepad | Tee-Object -Variable proc | Select-Object ProcessName, Handles
7171
```
7272

7373
```Output
@@ -88,8 +88,8 @@ This example saves a list of system files in a two log files, a cumulative file
8888

8989
```powershell
9090
Get-ChildItem -Path D: -File -System -Recurse |
91-
Tee-Object -FilePath "c:\test\AllSystemFiles.txt" -Append |
92-
Out-File c:\test\NewSystemFiles.txt
91+
Tee-Object -FilePath "C:\test\AllSystemFiles.txt" -Append |
92+
Out-File C:\test\NewSystemFiles.txt
9393
```
9494

9595
The command uses the `Get-ChildItem` cmdlet to do a recursive search for system files on the D:

reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This example starts a trace of metadata processing, parameter binding, and cmdle
4444
destruction of the `Get-Process Notepad` expression.
4545

4646
```powershell
47-
Trace-Command -Name metadata,parameterbinding,cmdlet -Expression {Get-Process Notepad} -PSHost
47+
Trace-Command -Name Metadata, ParameterBinding, Cmdlet -Expression {Get-Process Notepad} -PSHost
4848
```
4949

5050
It uses the **Name** parameter to specify the trace sources, the **Expression** parameter to specify

reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ Stream Length
8585
Zone.Identifier 26
8686
8787
PS C:\> C:\ps-test\Start-ActivityTracker.ps1
88-
c:\ps-test\Start-ActivityTracker.ps1 : File c:\ps-test\Start-ActivityTracker.ps1 cannot
89-
be loaded. The file c:\ps-test\Start-ActivityTracker.ps1 is not digitally signed. The script
88+
C:\ps-test\Start-ActivityTracker.ps1 : File C:\ps-test\Start-ActivityTracker.ps1 cannot
89+
be loaded. The file C:\ps-test\Start-ActivityTracker.ps1 is not digitally signed. The script
9090
will not execute on the system. For more information, see about_Execution_Policies.
9191
9292
At line:1 char:1
93-
+ c:\ps-test\Start-ActivityTracker.ps1
93+
+ C:\ps-test\Start-ActivityTracker.ps1
9494
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9595
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
9696
+ FullyQualifiedErrorId : UnauthorizedAccess

reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ This command reloads the formatting files that it loaded previously.
5151
### Example 2: Reload formatting files and trace and log formatting files
5252

5353
```powershell
54-
Update-FormatData -AppendPath "trace.format.ps1xml, log.format.ps1xml"
54+
Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xml
5555
```
5656

5757
This command reloads the formatting files into the session, including two new files,
58-
Trace.format.ps1xml and Log.format.ps1xml.
58+
`Trace.format.ps1xml` and `Log.format.ps1xml`.
5959

6060
Because the command uses the **AppendPath** parameter, the formatting data in the new files is loaded
6161
after the formatting data from the built-in files.
@@ -66,7 +66,7 @@ are not referenced in the built-in files.
6666
### Example 3: Edit a formatting file and reload it
6767

6868
```powershell
69-
Update-FormatData -PrependPath "c:\test\NewFiles.format.ps1xml"
69+
Update-FormatData -PrependPath "C:\test\NewFiles.format.ps1xml"
7070
7171
# Edit the NewFiles.format.ps1 file.
7272
@@ -75,15 +75,15 @@ Update-FormatData
7575

7676
This example shows how to reload a formatting file after you have edited it.
7777

78-
The first command adds the NewFiles.format.ps1xml file to the session. It uses the **PrependPath**
78+
The first command adds the `NewFiles.format.ps1xml` file to the session. It uses the **PrependPath**
7979
parameter because the file contains formatting data for objects that are referenced in the built-in
8080
files.
8181

82-
After adding the NewFiles.format.ps1xml file and testing it in these sessions, the author edits the
83-
file.
82+
After adding the `NewFiles.format.ps1xml` file and testing it in these sessions, the author edits
83+
the file.
8484

8585
The second command uses the `Update-FormatData` cmdlet to reload the formatting files. Because the
86-
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it
86+
`NewFiles.format.ps1xml` file was previously loaded, `Update-FormatData` automatically reloads it
8787
without using parameters.
8888

8989
## PARAMETERS

reference/5.1/Microsoft.PowerShell.Utility/Update-List.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,43 +51,43 @@ interface.
5151

5252
In this example we create a class that represents a deck of cards where the cards are stored as a
5353
**List** collection object. The **NewDeck()** method uses `Update-List`to add a complete deck of
54-
card values to the **cards** collection.
54+
card values to the **Cards** collection.
5555

5656
```powershell
5757
class Cards {
5858
59-
[System.Collections.Generic.List[string]]$cards
60-
[string]$name
59+
[System.Collections.Generic.List[string]]$Cards
60+
[string]$Name
6161
6262
Cards([string]$_name) {
63-
$this.name = $_name
64-
$this.cards = [System.Collections.Generic.List[string]]::new()
63+
$this.Name = $_name
64+
$this.Cards = [System.Collections.Generic.List[string]]::new()
6565
}
6666
6767
NewDeck() {
6868
$_suits = [char]0x2663,[char]0x2666,[char]0x2665,[char]0x2660
6969
$_values = 'A',2,3,4,5,6,7,8,9,10,'J','Q','K'
7070
$_deck = foreach ($s in $_suits){ foreach ($v in $_values){ "$v$s"} }
71-
$this | Update-List -Property cards -Add $_deck | Out-Null
71+
$this | Update-List -Property Cards -Add $_deck | Out-Null
7272
}
7373
7474
Show() {
7575
Write-Host
76-
Write-Host $this.name ": " $this.cards[0..12]
77-
if ($this.cards.count -gt 13) {
78-
Write-Host (' ' * ($this.name.length+3)) $this.cards[13..25]
76+
Write-Host $this.Name ": " $this.Cards[0..12]
77+
if ($this.Cards.Count -gt 13) {
78+
Write-Host (' ' * ($this.Name.Length+3)) $this.Cards[13..25]
7979
}
80-
if ($this.cards.count -gt 26) {
81-
Write-Host (' ' * ($this.name.length+3)) $this.cards[26..38]
80+
if ($this.Cards.Count -gt 26) {
81+
Write-Host (' ' * ($this.Name.Length+3)) $this.Cards[26..38]
8282
}
83-
if ($this.cards.count -gt 39) {
84-
Write-Host (' ' * ($this.name.length+3)) $this.cards[39..51]
83+
if ($this.Cards.Count -gt 39) {
84+
Write-Host (' ' * ($this.Name.Length+3)) $this.Cards[39..51]
8585
}
8686
}
8787
88-
Shuffle() { $this.cards = Get-Random -InputObject $this.cards -Count 52 }
88+
Shuffle() { $this.Cards = Get-Random -InputObject $this.Cards -Count 52 }
8989
90-
Sort() { $this.cards.Sort() }
90+
Sort() { $this.Cards.Sort() }
9191
}
9292
```
9393

@@ -111,10 +111,10 @@ $deck.Shuffle()
111111
$deck.Show()
112112
113113
# Deal two hands
114-
$player1 | Update-List -Property cards -Add $deck.cards[0,2,4,6,8] | Out-Null
115-
$player2 | Update-List -Property cards -Add $deck.cards[1,3,5,7,9] | Out-Null
116-
$deck | Update-List -Property cards -Remove $player1.cards | Out-Null
117-
$deck | Update-List -Property cards -Remove $player2.cards | Out-Null
114+
$player1 | Update-List -Property Cards -Add $deck.Cards[0,2,4,6,8] | Out-Null
115+
$player2 | Update-List -Property Cards -Add $deck.Cards[1,3,5,7,9] | Out-Null
116+
$deck | Update-List -Property Cards -Remove $player1.Cards | Out-Null
117+
$deck | Update-List -Property Cards -Remove $player2.Cards | Out-Null
118118
119119
$player1.Show()
120120
$player2.Show()
@@ -150,11 +150,11 @@ example, Player 1 wants to discard the `4♦` and `6♦` and get two new cards.
150150

151151
```powershell
152152
# Player 1 wants two new cards - remove 2 cards & add 2 cards
153-
$player1 | Update-List -Property cards -Remove $player1.cards[0,4] -Add $deck.cards[0..1] | Out-Null
153+
$player1 | Update-List -Property Cards -Remove $player1.Cards[0,4] -Add $deck.Cards[0..1] | Out-Null
154154
$player1.Show()
155155
156156
# remove dealt cards from deck
157-
$deck | Update-List -Property cards -Remove $deck.cards[0..1] | Out-Null
157+
$deck | Update-List -Property Cards -Remove $deck.Cards[0..1] | Out-Null
158158
$deck.Show()
159159
```
160160

@@ -187,7 +187,7 @@ Remove {43}
187187
```
188188

189189
```powershell
190-
([PSListModifier]($changeInstructions)).ApplyTo($list)
190+
([pslistmodifier]($changeInstructions)).ApplyTo($list)
191191
$list
192192
```
193193

reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ when no properties are specified. Because the type data is not specified in a `T
153153
it is effective only in the current session.
154154

155155
```powershell
156-
Get-Date | Format-list
156+
Get-Date | Format-List
157157
158158
Update-TypeData -TypeName "System.DateTime" -DefaultDisplayPropertySet @(
159159
'DateTime'

reference/5.1/Microsoft.PowerShell.Utility/Wait-Debugger.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Test-Condition {
4949
[string]$Message = "Hello, $Name!"
5050
)
5151
52-
if ($Name -eq $env:USERNAME) {
52+
if ($Name -eq $Env:USERNAME) {
5353
Write-Output "$Message"
5454
} else {
5555
# Remove after debugging
@@ -70,7 +70,7 @@ At D:\temp\test\dbgtest.ps1:13 char:9
7070
[DBG]: PS D:\>> l
7171
7272
8:
73-
9: if ($Name -eq $env:USERNAME) {
73+
9: if ($Name -eq $Env:USERNAME) {
7474
10: Write-Output "$Message"
7575
11: } else {
7676
12: # Remove after debugging
@@ -80,7 +80,7 @@ At D:\temp\test\dbgtest.ps1:13 char:9
8080
16: }
8181
17: }
8282
83-
[DBG]: PS D:\>> $env:USERNAME
83+
[DBG]: PS D:\>> $Env:USERNAME
8484
User01
8585
[DBG]: PS D:\>> exit
8686
PS D:\>
@@ -113,7 +113,7 @@ class FileResource
113113
114114
[void] Set() {
115115
$fileExists = $this.TestFilePath($this.Path)
116-
if ($this.ensure -eq [Ensure]::Present) {
116+
if ($this.Ensure -eq [Ensure]::Present) {
117117
if (! $fileExists) {
118118
$this.CopyFile()
119119
}

reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Non-terminating errors write an error to the error stream, but they don't stop c
5353
If a non-terminating error is declared on one item in a collection of input items, the command
5454
continues to process the other items in the collection.
5555

56-
To declare a terminating error, use the `Throw` keyword.
56+
To declare a terminating error, use the `throw` keyword.
5757
For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
5858

5959
## EXAMPLES

reference/5.1/Microsoft.PowerShell.Utility/Write-Progress.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ text that appears above and below the progress bar.
2929

3030
## EXAMPLES
3131

32-
### Example 1: Display the progress of a For loop
32+
### Example 1: Display the progress of a `for` loop
3333

3434
```powershell
3535
for ($i = 1; $i -le 100; $i++ ) {
@@ -44,7 +44,7 @@ The `Write-Progress` cmdlet includes a status bar heading `Activity`, a status l
4444
variable `$i` (the counter in the `for` loop), which indicates the relative completeness of the
4545
task.
4646

47-
### Example 2: Display the progress of nested For loops
47+
### Example 2: Display the progress of nested `for` loops
4848

4949
```powershell
5050
for($I = 0; $I -lt 10; $I++ ) {
@@ -80,7 +80,7 @@ Progress
8080
InnerLoop
8181
```
8282

83-
This example displays the progress of two nested For loops, each of which is represented by a
83+
This example displays the progress of two nested `for` loops, each of which is represented by a
8484
progress bar.
8585

8686
The `Write-Progress` command for the second progress bar includes the **Id** parameter that
@@ -93,7 +93,7 @@ displayed one below the other.
9393

9494
```powershell
9595
# Use Get-EventLog to get the events in the System log and store them in the $Events variable.
96-
$Events = Get-EventLog -LogName system
96+
$Events = Get-EventLog -LogName System
9797
# Pipe the events to the ForEach-Object cmdlet.
9898
$Events | ForEach-Object -Begin {
9999
# In the Begin block, use Clear-Host to clear the screen.
@@ -104,15 +104,15 @@ $Events | ForEach-Object -Begin {
104104
$out = ""
105105
} -Process {
106106
# In the Process script block search the message property of each incoming object for "bios".
107-
if($_.message -like "*bios*")
107+
if($_.Message -like "*bios*")
108108
{
109109
# Append the matching message to the out variable.
110110
$out=$out + $_.Message
111111
}
112112
# Increment the $i counter variable which is used to create the progress bar.
113113
$i = $i+1
114114
# Determine the completion percentage
115-
$Completed = ($i/$Events.count) * 100
115+
$Completed = ($i/$Events.Count) * 100
116116
# Use Write-Progress to output a progress bar.
117117
# The Activity and Status parameters create the first and second lines of the progress bar
118118
# heading, respectively.
@@ -126,7 +126,7 @@ $Events | ForEach-Object -Begin {
126126
This command displays the progress of a command to find the string "bios" in the System event log.
127127

128128
The **PercentComplete** parameter value is calculated by dividing the number of events that have
129-
been processed `$i` by the total number of events retrieved `$Events.count` and then multiplying
129+
been processed `$i` by the total number of events retrieved `$Events.Count` and then multiplying
130130
that result by 100.
131131

132132
### Example 4: Display progress for each level of a nested process

reference/7.4/Microsoft.PowerShell.Utility/Sort-Object.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ Get-History | Sort-Object -Property Id -Descending
149149
8 Get-Command Sort-Object -Syntax
150150
7 Get-Command Sort-Object -ShowCommandInfo
151151
6 Get-ChildItem -Path C:\Test | Sort-Object -Property Length
152-
5 Get-Help Clear-History -online
153-
4 Get-Help Clear-History -full
152+
5 Get-Help Clear-History -Online
153+
4 Get-Help Clear-History -Full
154154
3 Get-ChildItem | Get-Member
155155
2 Get-Command Sort-Object -Syntax
156156
1 Set-Location C:\Test\
@@ -590,8 +590,8 @@ use a scriptblock or a hashtable.
590590

591591
Valid keys for a hash table are as follows:
592592

593-
- `expression` - `<string>` or `<script block>`
594-
- `ascending` or `descending` - `<boolean>`
593+
- `Expression` - `<string>` or `<script block>`
594+
- `Ascending` or `Descending` - `<boolean>`
595595

596596
For more information, see
597597
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md).

reference/7.4/Microsoft.PowerShell.Utility/Tee-Object.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This example gets a list of the processes running on the computer, saves them to
6767
variable, and pipes them to `Select-Object`.
6868

6969
```powershell
70-
Get-Process notepad | Tee-Object -Variable proc | Select-Object processname,handles
70+
Get-Process notepad | Tee-Object -Variable proc | Select-Object ProcessName, Handles
7171
```
7272

7373
```Output
@@ -88,8 +88,8 @@ This example saves a list of system files in a two log files, a cumulative file
8888

8989
```powershell
9090
Get-ChildItem -Path D: -File -System -Recurse |
91-
Tee-Object -FilePath "c:\test\AllSystemFiles.txt" -Append |
92-
Out-File c:\test\NewSystemFiles.txt
91+
Tee-Object -FilePath "C:\test\AllSystemFiles.txt" -Append |
92+
Out-File C:\test\NewSystemFiles.txt
9393
```
9494

9595
The command uses the `Get-ChildItem` cmdlet to do a recursive search for system files on the D:

reference/7.4/Microsoft.PowerShell.Utility/Trace-Command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This example starts a trace of metadata processing, parameter binding, and cmdle
4444
destruction of the `Get-Process Notepad` expression.
4545

4646
```powershell
47-
Trace-Command -Name metadata,parameterbinding,cmdlet -Expression {Get-Process Notepad} -PSHost
47+
Trace-Command -Name Metadata, ParameterBinding, Cmdlet -Expression {Get-Process Notepad} -PSHost
4848
```
4949

5050
It uses the **Name** parameter to specify the trace sources, the **Expression** parameter to specify

reference/7.4/Microsoft.PowerShell.Utility/Unblock-File.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ Stream Length
8888
Zone.Identifier 26
8989
9090
PS C:\> C:\ps-test\Start-ActivityTracker.ps1
91-
c:\ps-test\Start-ActivityTracker.ps1 : File c:\ps-test\Start-ActivityTracker.ps1 cannot
92-
be loaded. The file c:\ps-test\Start-ActivityTracker.ps1 is not digitally signed. The script
91+
C:\ps-test\Start-ActivityTracker.ps1 : File C:\ps-test\Start-ActivityTracker.ps1 cannot
92+
be loaded. The file C:\ps-test\Start-ActivityTracker.ps1 is not digitally signed. The script
9393
will not execute on the system. For more information, see about_Execution_Policies.
9494
9595
At line:1 char:1
96-
+ c:\ps-test\Start-ActivityTracker.ps1
96+
+ C:\ps-test\Start-ActivityTracker.ps1
9797
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9898
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
9999
+ FullyQualifiedErrorId : UnauthorizedAccess

0 commit comments

Comments
 (0)