Skip to content

Commit 0cb6993

Browse files
Fix incorrect case/capitalization in ref docs
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 683ebdf commit 0cb6993

40 files changed

+157
-157
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Hidden.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PowerShell 5.0.
4848
## EXAMPLE
4949

5050
The following example shows how to use the `hidden` keyword in a class
51-
definition. The **Car** class method, **Drive**, has a property, **rides**,
51+
definition. The **Car** class method, **Drive**, has a property, **Rides**,
5252
that does not need to be viewed or changed as it merely tallies the number of
5353
times that **Drive** is called on the **Car** class. That metric that is not
5454
important to users of the class (consider, for example, that when you are
@@ -68,20 +68,20 @@ later to identify all members that you have hidden.
6868
class Car
6969
{
7070
# Properties
71-
[String] $Color
72-
[String] $ModelYear
71+
[string] $Color
72+
[string] $ModelYear
7373
[int] $Distance
7474
7575
# Method
76-
[int] Drive ([int]$miles)
76+
[int] Drive ([int]$Miles)
7777
{
78-
$this.Distance += $miles
79-
$this.rides++
78+
$this.Distance += $Miles
79+
$this.Rides++
8080
return $this.Distance
8181
}
8282
8383
# Hidden property of the Drive method
84-
hidden [int] $rides = 0
84+
hidden [int] $Rides = 0
8585
}
8686
```
8787

@@ -93,7 +93,7 @@ $TestCar = [Car]::new()
9393
```
9494

9595
After you create the new instance, pipe the contents of the `$TestCar` variable
96-
to `Get-Member`. Observe that the **rides** property is not among the members
96+
to `Get-Member`. Observe that the **Rides** property is not among the members
9797
listed in the `Get-Member` command results.
9898

9999
```output
@@ -103,7 +103,7 @@ PS C:\Windows\system32> $TestCar | Get-Member
103103
104104
Name MemberType Definition
105105
---- ---------- ----------
106-
Drive Method int Drive(int miles)
106+
Drive Method int Drive(int Miles)
107107
Equals Method bool Equals(System.Object obj)
108108
GetHashCode Method int GetHashCode()
109109
GetType Method type GetType()
@@ -115,7 +115,7 @@ ModelYear Property string ModelYear {get;set;}
115115
```
116116

117117
Now, try running `Get-Member` again, but this time, add the `-Force` parameter.
118-
Note that the results contain the hidden **rides** property, among other
118+
Note that the results contain the hidden **Rides** property, among other
119119
members that are hidden by default.
120120

121121
```output
@@ -130,23 +130,23 @@ psadapted MemberSet psadapted {Color, ModelYear, Distance,
130130
psbase MemberSet psbase {Color, ModelYear, Distance,...
131131
psextended MemberSet psextended {}
132132
psobject MemberSet psobject {BaseObject, Members,...
133-
Drive Method int Drive(int miles)
133+
Drive Method int Drive(int Miles)
134134
Equals Method bool Equals(System.Object obj)
135135
GetHashCode Method int GetHashCode()
136136
GetType Method type GetType()
137137
get_Color Method string get_Color()
138138
get_Distance Method int get_Distance()
139139
get_ModelYear Method string get_ModelYear()
140-
get_rides Method int get_rides()
140+
get_Rides Method int get_Rides()
141141
set_Color Method void set_Color(string )
142142
set_Distance Method void set_Distance(int )
143143
set_ModelYear Method void set_ModelYear(string )
144-
set_rides Method void set_rides(int )
144+
set_Rides Method void set_Rides(int )
145145
ToString Method string ToString()
146146
Color Property string Color {get;set;}
147147
Distance Property int Distance {get;set;}
148148
ModelYear Property string ModelYear {get;set;}
149-
rides Property int rides {get;set;}
149+
Rides Property int Rides {get;set;}
150150
151151
```
152152

reference/5.1/Microsoft.PowerShell.Core/About/about_If.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ statement. If both `<test1>` and `<test2>` evaluate to false, the
4848
You can use multiple `elseif` statements to chain a series of conditional
4949
tests. Each test is run only if all the previous tests are false. If you need
5050
to create an `if` statement that contains many `elseif` statements, consider
51-
using a Switch statement instead.
51+
using a `switch` statement instead.
5252

5353
Examples:
5454

@@ -67,7 +67,7 @@ evaluates to true, and the statement list runs. However, if `$a` is less than
6767
or equal to `2` or isn't an existing variable, the `if` statement doesn't
6868
display a message.
6969

70-
By adding an Else statement, a message is displayed when $a is less than or
70+
By adding an `else` statement, a message is displayed when $a is less than or
7171
equal to 2. As the next example shows:
7272

7373
```powershell

reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ For more information, see [about_Operators][03].
211211

212212
## New() method for types
213213

214-
Beginning in PowerShell 5.0, PowerShell adds a static `New()` method for all
214+
Beginning in PowerShell 5.0, PowerShell adds a static `new()` method for all
215215
.NET types. The following examples produce the same result.
216216

217217
```powershell

reference/5.1/Microsoft.PowerShell.Core/About/about_Job_Details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ other cmdlets might work differently.
8484

8585
The child jobs are stored in the **ChildJobs** property of the parent job
8686
object. The **ChildJobs** property can contain one or many child job objects.
87-
The child job objects have a **Name**, **ID**, and **InstanceId** that differ
87+
The child job objects have a **Name**, **Id**, and **InstanceId** that differ
8888
from the parent job so that you can manage the parent and child jobs
8989
individually or as a unit.
9090

reference/5.1/Microsoft.PowerShell.Core/About/about_Jobs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ is completed and all results are available.
248248

249249
You can also use the `Wait-Job` cmdlet to wait for any or all of the results of
250250
the job. `Wait-Job` lets you wait for one or more specific job or for all jobs.
251-
The following command uses the `Wait-Job` cmdlet to wait for a job with **ID**
251+
The following command uses the `Wait-Job` cmdlet to wait for a job with **Id**
252252
10.
253253

254254
```powershell
255-
Wait-Job -ID 10
255+
Wait-Job -Id 10
256256
```
257257

258258
As a result, the PowerShell prompt is suppressed until the job is completed.
@@ -262,7 +262,7 @@ You can also wait for a predetermined period of time. This command uses the
262262
the command prompt returns, but the job continues to run in the background.
263263

264264
```powershell
265-
Wait-Job -ID 10 -Timeout 120
265+
Wait-Job -Id 10 -Timeout 120
266266
```
267267

268268
## Stopping a job

reference/5.1/Microsoft.PowerShell.Core/About/about_Join.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Describes how the join operator (-join) combines multiple strings into a single string.
2+
description: Describes how the join operator (`-join`) combines multiple strings into a single string.
33
Locale: en-US
44
ms.date: 06/09/2017
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_join?view=powershell-5.1&WT.mc_id=ps-gethelp
@@ -11,7 +11,7 @@ title: about_Join
1111

1212
## Short description
1313

14-
Describes how the join operator (-join) combines multiple strings into a
14+
Describes how the join operator (`-join`) combines multiple strings into a
1515
single string.
1616

1717
## Long description
@@ -38,7 +38,7 @@ concatenated strings. The default is no delimiter ("").
3838

3939
Remarks
4040

41-
The unary join operator (-join <string[]>) has higher precedence than a
41+
The unary join operator (`-join <string[]>`) has higher precedence than a
4242
comma. As a result, if you submit a comma-separated list of strings to the
4343
unary join operator, only the first string (before the first comma) is
4444
submitted to the join operator.

reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ about topic for the keyword and the information that follows the table.
3535
| `filter` | [about_Functions][18] |
3636
| `finally` | [about_Try_Catch_Finally][26] |
3737
| `for` | [about_For][13] |
38-
| `foreach` | [about_ForEach][14] |
38+
| `foreach` | [about_Foreach][14] |
3939
| `from` | Reserved for future use |
4040
| `function` | [about_Functions][18], [about_Functions_Advanced][17] |
4141
| `hidden` | [about_Hidden][19] |
4242
| `if` | [about_If][20] |
43-
| `in` | [about_ForEach][14] |
43+
| `in` | [about_Foreach][14] |
4444
| `param` | [about_Functions][18] |
4545
| `process` | [about_Functions][18], [about_Functions_Advanced][17] |
4646
| `return` | [about_Return][21] |
@@ -155,7 +155,7 @@ also include `if` statements and some limited commands.
155155
Syntax:
156156

157157
```Syntax
158-
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>}
158+
data <variable> [-SupportedCommand <cmdlet-name>] {<permitted content>}
159159
```
160160

161161
## `do`
@@ -281,7 +281,7 @@ C:\scripts\test>type test.ps1
281281
3
282282
exit 4
283283
284-
C:\scripts\test>powershell -file ./test.ps1
284+
C:\scripts\test>powershell -File ./test.ps1
285285
1
286286
2
287287
3
@@ -358,7 +358,7 @@ Syntax:
358358

359359
```Syntax
360360
function [<scope:>]<name> {
361-
param ([type]<$pname1> [, [type]<$pname2>])
361+
param ([type]<$PName1> [, [type]<$PName2>])
362362
dynamicparam {<statement list>}
363363
begin {<statement list>}
364364
process {<statement list>}
@@ -372,7 +372,7 @@ statement list after the function name.
372372
Syntax:
373373

374374
```Syntax
375-
function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
375+
function [<scope:>]<name> [([type]<$PName1>, [[type]<$PName2>])] {
376376
dynamicparam {<statement list>}
377377
begin {<statement list>}
378378
process {<statement list>}
@@ -420,7 +420,7 @@ Syntax:
420420

421421
```Syntax
422422
function [<scope:>]<name> {
423-
param ([type]<$pname1>[, [[type]<$pname2>]])
423+
param ([type]<$PName1>[, [[type]<$PName2>]])
424424
<statement list>
425425
}
426426
```
@@ -554,7 +554,7 @@ include classes from modules.
554554
Namespace syntax:
555555

556556
```Syntax
557-
using namespace <.Net-framework-namespace>
557+
using namespace <.NET-Framework-namespace>
558558
```
559559

560560
Module syntax:
@@ -567,7 +567,7 @@ Assembly syntax:
567567

568568
```Syntax
569569
using assembly <.NET-assembly-path>
570-
using assembly <.NET-framework-namespace>
570+
using assembly <.NET-Framework-namespace>
571571
```
572572

573573
For more information, see [about_Using][27].
@@ -614,7 +614,7 @@ do {<statement list>} while (<condition>)
614614
[11]: about_Do.md
615615
[12]: about_Enum.md
616616
[13]: about_For.md
617-
[14]: about_ForEach.md
617+
[14]: about_Foreach.md
618618
[15]: about_Functions_Advanced_Methods.md
619619
[16]: about_Functions_Advanced_Parameters.md
620620
[17]: about_Functions_Advanced.md

reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ additional variables:
176176
- `$PSScriptRoot`
177177
- `$PSEdition`
178178
- `$EnabledExperimentalFeatures`
179-
- Any environment variables, like `$ENV:TEMP`
179+
- Any environment variables, like `$Env:TEMP`
180180

181181
Only the following comparison operators are permitted:
182182

reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ of FALSE. All other integers have a value of TRUE.
6060
The syntax of the logical operators is as follows:
6161

6262
```Syntax
63-
<statement> {-AND | -OR | -XOR} <statement>
64-
{! | -NOT} <statement>
63+
<statement> {-and | -or | -xor} <statement>
64+
{! | -not} <statement>
6565
```
6666

6767
Statements that use the logical operators return Boolean (TRUE or FALSE)
@@ -72,7 +72,7 @@ determine the truth value of the statement. If the left operand in a statement
7272
that contains the and operator is FALSE, the right operand isn't evaluated. If
7373
the left operand in a statement that contains the or statement is TRUE, the
7474
right operand isn't evaluated. As a result, you can use these statements in
75-
the same way that you would use the `If` statement.
75+
the same way that you would use the `if` statement.
7676

7777
## See also
7878

reference/5.1/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ PS> $CapitalizedProperty = @{
230230
Value = { $this.ToUpper() }
231231
PassThru = $true
232232
}
233-
PS> [System.Collections.Generic.List[object]]$MixedCollection = @(
233+
PS> [System.Collections.Generic.List[Object]]$MixedCollection = @(
234234
'a'
235235
('b' | Add-Member @CapitalizedProperty)
236236
('c' | Add-Member @CapitalizedProperty)
@@ -284,7 +284,7 @@ successful method calls isn't returned. Terminating error conditions include:
284284
Consider the following example:
285285

286286
```powershell
287-
class Class1 { [object] Foo() { return 'Bar' } }
287+
class Class1 { [Object] Foo() { return 'Bar' } }
288288
class Class2 { [void] Foo() { throw 'Error' } }
289289
class Class3 {}
290290

0 commit comments

Comments
 (0)