Skip to content

Commit eb453d7

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 eb453d7

40 files changed

+247
-247
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ following example uses the first `CopyTo` method to copy the `Final.txt` file
119119
to the `C:\Bin` directory.
120120

121121
```powershell
122-
(Get-ChildItem c:\final.txt).CopyTo("c:\bin\final.txt")
122+
(Get-ChildItem C:\final.txt).CopyTo("C:\bin\final.txt")
123123
```
124124

125125
> [!NOTE]
@@ -138,7 +138,7 @@ The following example uses the second `CopyTo` method to copy the `Final.txt`
138138
file to the `C:\Bin` directory, and to overwrite existing files.
139139

140140
```powershell
141-
(Get-ChildItem c:\final.txt).CopyTo("c:\bin\final.txt", $true)
141+
(Get-ChildItem C:\final.txt).CopyTo("C:\bin\final.txt", $true)
142142
```
143143

144144
## Member-access enumeration
@@ -190,7 +190,7 @@ At line:1 char:12
190190
l.Commands.GetProcessCommand
191191
```
192192

193-
This example is functionally equivalent to using the `Foreach-Object` cmdlet to
193+
This example is functionally equivalent to using the `ForEach-Object` cmdlet to
194194
run the method on each object in the collection.
195195

196196
```powershell
@@ -203,7 +203,7 @@ Beginning in PowerShell 4.0, collection filtering using a method syntax is
203203
supported. This allows use of two new methods when dealing with collections
204204
`ForEach` and `Where`.
205205

206-
You can read more about these methods in [about_arrays](about_arrays.md)
206+
You can read more about these methods in [about_Arrays](about_arrays.md)
207207

208208
## Calling a specific method when multiple overloads exist
209209

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Allowed variables
9999
- `$PSScriptRoot`
100100
- `$PSEdition`
101101
- `$EnabledExperimentalFeatures`
102-
- Any environment variables, like `$ENV:TEMP`
102+
- Any environment variables, like `$Env:TEMP`
103103

104104
For more information, see [about_Language_Modes][08].
105105

@@ -1416,7 +1416,7 @@ For example, this manifest defines the **PublishedDate** key in
14161416
Cmdlets in the module can access this value with the `$MyInvocation` variable.
14171417

14181418
```powershell
1419-
Function Get-Stale {
1419+
function Get-Stale {
14201420
[CmdletBinding()]
14211421
param()
14221422
@@ -1428,7 +1428,7 @@ Function Get-Stale {
14281428
} catch {
14291429
# The date was set in the manifest, set to an invalid value, or
14301430
# the script module was directly imported without the manifest.
1431-
Throw "Unable to determine published date. Check the module manifest."
1431+
throw "Unable to determine published date. Check the module manifest."
14321432
}
14331433
14341434
if ($CurrentDate -gt $PublishedDate.AddDays(30)) {

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A module is a self-contained, reusable unit that can include cmdlets,
2323
providers, functions, variables, and other resources. By default, PowerShell
2424
automatically loads an installed module the first time you use a command from
2525
the module. You can configure automatic module loading behavior using the
26-
variable `$PSModuleAutoloadingPreference`. For more information, see
26+
variable `$PSModuleAutoLoadingPreference`. For more information, see
2727
[about_Preference_Variables][08].
2828

2929
You can also manually load or unload modules during a PowerShell session. To
@@ -49,7 +49,7 @@ to create PowerShell modules, see [Writing a PowerShell Module][02].
4949

5050
PowerShell stores modules in the following default locations:
5151

52-
- All users scope - `$env:ProgramFiles\WindowsPowerShell\Modules`
52+
- All users scope - `$Env:ProgramFiles\WindowsPowerShell\Modules`
5353
- Current user scope - `$HOME\Documents\WindowsPowerShell\Modules`
5454
- Modules shipped with PowerShell - `$PSHOME\Modules`
5555

@@ -64,15 +64,15 @@ Use the following command to create a `Modules` folder for the current user:
6464
$folder = New-Item -Type Directory -Path $HOME\Documents\WindowsPowerShell\Modules
6565
```
6666

67-
These locations are automatically included in the `$env:PSModulePath`
67+
These locations are automatically included in the `$Env:PSModulePath`
6868
environment variable. For more information about the default module locations,
6969
see [about_PSModulePath][10].
7070

7171
## Module autoloading
7272

7373
The first time that you run a command from an installed module, PowerShell
7474
automatically imports (loads) that module. The module must be stored in the
75-
locations specified in the `$env:PSModulePath` environment variable.
75+
locations specified in the `$Env:PSModulePath` environment variable.
7676

7777
Module autoloading allows you to use commands in a module without any setup or
7878
profile configuration. Each of the following examples causes the **CimCmdlets**
@@ -103,7 +103,7 @@ modules that you might not need in your session.
103103
## Manually import a module
104104

105105
Manually importing a module is required when a module isn't installed in the
106-
locations specified by the `$env:PSModulePath` environment variable, or when
106+
locations specified by the `$Env:PSModulePath` environment variable, or when
107107
the module is provided as a standalone `.dll` or `.psm1` file, rather than a
108108
packaged module.
109109

@@ -127,7 +127,7 @@ session.
127127
Import-Module BitsTransfer
128128
```
129129

130-
To import a module that isn't in your `$env:PSModulePath`, use the fully
130+
To import a module that isn't in your `$Env:PSModulePath`, use the fully
131131
qualified path to the module folder. For example, to add the **TestCmdlets**
132132
module in the `C:\ps-test` directory to your session, type:
133133

@@ -187,7 +187,7 @@ For more information, see [PowerShellGet Overview][01].
187187
You can manually install a module by copying the module contents from another
188188
folder. That folder can be in another location on the local machine or
189189
installed on another machine. To install a module manually, copy the entire
190-
module folder into a new location included in your `$env:PSModulePath`.
190+
module folder into a new location included in your `$Env:PSModulePath`.
191191

192192
In PowerShell use the `Copy-Item` cmdlet. For example, run the following
193193
command to copy the `MyModule` folder from `C:\PSTest`:
@@ -210,16 +210,16 @@ Get-Module
210210
```
211211

212212
The modules listed can include modules that were imported from any location,
213-
not just from `$env:PSModulePath`.
213+
not just from `$Env:PSModulePath`.
214214

215215
Use the following command to list modules that are installed in the
216-
`$env:PSModulePath`:
216+
`$Env:PSModulePath`:
217217

218218
```powershell
219219
Get-Module -ListAvailable
220220
```
221221

222-
This command gets all modules that are installed in `$env:PSModulePath`, not
222+
This command gets all modules that are installed in `$Env:PSModulePath`, not
223223
just the modules that are imported into the current session. This command
224224
doesn't list modules that are installed in other locations.
225225

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ PowerShell supports the following type accelerators:
133133
| ----------- | -------------------- | -------------------------------- |
134134
| `[byte]` | | Byte (unsigned) |
135135
| `[sbyte]` | | Byte (signed) |
136-
| `[Int16]` | | 16-bit integer |
137-
| `[UInt16]` | | 16-bit integer (unsigned) |
138-
| `[Int32]` | | 32-bit integer |
136+
| `[int16]` | | 16-bit integer |
137+
| `[uint16]` | | 16-bit integer (unsigned) |
138+
| `[int32]` | | 32-bit integer |
139139
| `[int]` | alias for `[int32]` | 32-bit integer |
140-
| `[UInt32]` | | 32-bit integer (unsigned) |
141-
| `[Int64]` | | 64-bit integer |
140+
| `[uint32]` | | 32-bit integer (unsigned) |
141+
| `[int64]` | | 64-bit integer |
142142
| `[long]` | alias for `[int64]` | 64-bit integer |
143-
| `[UInt64]` | | 64-bit integer (unsigned) |
143+
| `[uint64]` | | 64-bit integer (unsigned) |
144144
| `[bigint]` | | See [BigInteger Struct][bigint] |
145145
| `[single]` | | Single precision floating point |
146146
| `[float]` | alias for `[single]` | Single precision floating point |

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ There are many ways to create objects, this list is not definitive:
2121

2222
- [New-Object][16]: Creates an instance of a .NET Framework object or COM
2323
object.
24-
- [Import-Csv][15] / [ConvertFrom-CSV][11]: Creates custom objects
24+
- [Import-Csv][15] / [ConvertFrom-Csv][11]: Creates custom objects
2525
(**PSCustomObject**) from the items defined as character separated values.
2626
- [ConvertFrom-Json][12]: Creates custom objects defined in JavaScript Object
2727
Notation (JSON).
@@ -173,17 +173,17 @@ the example section of the `Update-Help` cmdlet help topic.
173173
```powershell
174174
function Test-Object {
175175
$ModuleName = "PSScheduledJob"
176-
$HelpCulture = "en-us"
176+
$HelpCulture = "en-US"
177177
$HelpVersion = "3.1.0.0"
178-
[PSCustomObject]@{
178+
[pscustomobject]@{
179179
"ModuleName"=$ModuleName
180180
"UICulture"=$HelpCulture
181181
"Version"=$HelpVersion
182182
}
183183
$ModuleName = "PSWorkflow"
184-
$HelpCulture = "en-us"
184+
$HelpCulture = "en-US"
185185
$HelpVersion = "3.0.0.0"
186-
[PSCustomObject]@{
186+
[pscustomobject]@{
187187
"ModuleName"=$ModuleName
188188
"UICulture"=$HelpCulture
189189
"Version"=$HelpVersion
@@ -198,8 +198,8 @@ table by default.
198198
```Output
199199
ModuleName UICulture Version
200200
--------- --------- -------
201-
PSScheduledJob en-us 3.1.0.0
202-
PSWorkflow en-us 3.0.0.0
201+
PSScheduledJob en-US 3.1.0.0
202+
PSWorkflow en-US 3.0.0.0
203203
```
204204

205205
Users can manage the properties of the custom objects just as they do with

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ The following example demonstrates how objects are passed from one
5454
command to the next:
5555

5656
```powershell
57-
Get-ChildItem C: | where { $_.PsIsContainer -eq $false } | Format-List
57+
Get-ChildItem C: | where { $_.PSIsContainer -eq $false } | Format-List
5858
```
5959

6060
The first command `Get-ChildItem C:` returns a file or directory object
6161
for each item in the root directory of the file system. The file and
6262
directory objects are passed down the pipeline to the second command.
6363

64-
The second command `where { $_.PsIsContainer -eq $false }` uses the
65-
**PsIsContainer** property of all file system objects to select only
66-
files, which have a value of False (`$false`) in their **PsIsContainer**
64+
The second command `where { $_.PSIsContainer -eq $false }` uses the
65+
**PSIsContainer** property of all file system objects to select only
66+
files, which have a value of False (`$false`) in their **PSIsContainer**
6767
property. Folders, which are containers and, thus, have a value of
68-
True (`$true`) in their **PsIsContainer** property, are not selected.
68+
True (`$true`) in their **PSIsContainer** property, are not selected.
6969

7070
The second command passes only the file objects to the third command
7171
`Format-List`, which displays the file objects in a list.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ precedence.
3434

3535
The Operator column lists the operators. The Reference column lists the
3636
PowerShell Help topic in which the operator is described. To display the topic,
37-
type `get-help <topic-name>`.
37+
type `Get-Help <topic-name>`.
3838

3939
| OPERATOR | REFERENCE |
4040
| --------------------------- | ------------------------------------ |
@@ -66,7 +66,7 @@ and explicitly case-insensitive variants have the same precedence.
6666
| `-like -notlike` | [about_Comparison_Operators][compare] |
6767
| `-match -notmatch` | [about_Comparison_Operators][compare] |
6868
| `-in -notIn` | [about_Comparison_Operators][compare] |
69-
| `-contains -notContains` | [about_Comparison_Operators][compare] |
69+
| `-contains -notcontains` | [about_Comparison_Operators][compare] |
7070
| `-replace` | [about_Comparison_Operators][compare] |
7171

7272
The list resumes here with the following operators in precedence
@@ -110,13 +110,13 @@ The following example gets the read-only text files from the local directory
110110
and saves them in the `$read_only` variable.
111111

112112
```powershell
113-
$read_only = Get-ChildItem *.txt | Where-Object {$_.isReadOnly}
113+
$read_only = Get-ChildItem *.txt | Where-Object {$_.IsReadOnly}
114114
```
115115

116116
It is equivalent to the following example.
117117

118118
```powershell
119-
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.isReadOnly} )
119+
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.IsReadOnly} )
120120
```
121121

122122
Because the pipeline operator (`|`) has a higher precedence than the assignment

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ of command in a string expression.
224224
PS> "Today is $(Get-Date)"
225225
Today is 12/02/2019 13:15:20
226226
227-
PS> "Folder list: $((dir c:\ -dir).Name -join ', ')"
227+
PS> "Folder list: $((dir C:\ -Dir).Name -join ', ')"
228228
Folder list: Program Files, Program Files (x86), Users, Windows
229229
```
230230

@@ -243,7 +243,7 @@ True True Object[] System.Array
243243
244244
PS> $list.Count
245245
20
246-
PS> $list = @(Get-Service | Where-Object Status -eq Starting )
246+
PS> $list = @(Get-Service | Where-Object Status -EQ Starting )
247247
PS> $list.GetType()
248248
249249
IsPublic IsSerial Name BaseType
@@ -348,7 +348,7 @@ Converts or limits objects to the specified type. If the objects can't be
348348
converted, PowerShell generates an error.
349349

350350
```powershell
351-
[DateTime] '2/20/88' - [DateTime] '1/20/88' -eq [TimeSpan] '31'
351+
[datetime] '2/20/88' - [datetime] '1/20/88' -eq [timespan] '31'
352352
```
353353

354354
A cast can also be performed when a variable is assigned to using
@@ -378,7 +378,7 @@ for which no value has been given become variables with no value. However, the
378378
automatic variable `$args` is preserved.
379379

380380
```powershell
381-
. c:\scripts\sample.ps1 1 2 -Also:3
381+
. C:\scripts\sample.ps1 1 2 -Also:3
382382
```
383383

384384
> [!NOTE]
@@ -414,7 +414,7 @@ Enter the composite format string on the left side of the operator and the
414414
objects to be formatted on the right side of the operator.
415415
416416
```powershell
417-
"{0} {1,-10} {2:N}" -f 1,"hello",[math]::pi
417+
"{0} {1,-10} {2:N}" -f 1,"hello",[Math]::PI
418418
```
419419
420420
```Output
@@ -467,7 +467,7 @@ PS> $a[2, 1, 0]
467467
```
468468

469469
```powershell
470-
(Get-HotFix | Sort-Object installedOn)[-1]
470+
(Get-HotFix | Sort-Object InstalledOn)[-1]
471471
```
472472

473473
```powershell
@@ -576,9 +576,9 @@ Accesses the properties and methods of an object. The member name may be an
576576
expression.
577577

578578
```powershell
579-
$myProcess.peakWorkingSet
580-
(Get-Process PowerShell).Kill()
581-
'OS', 'Platform' | Foreach-Object { $PSVersionTable. $_ }
579+
$myProcess.PeakWorkingSet
580+
(Get-Process powershell).Kill()
581+
'OS', 'Platform' | ForEach-Object { $PSVersionTable. $_ }
582582
```
583583

584584
Starting PowerShell 3.0, when you use the operator on a list collection object
@@ -594,7 +594,7 @@ properties and methods of an object, use the Static parameter of the
594594

595595
```powershell
596596
[datetime]::Now
597-
'MinValue', 'MaxValue' | Foreach-Object { [int]:: $_ }
597+
'MinValue', 'MaxValue' | ForEach-Object { [int]:: $_ }
598598
```
599599

600600
## See also

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function Measure-Lines {
134134
135135
if ($Words) {
136136
$wc = 0
137-
foreach ($line in $content) { $wc += $line.split(' ').Length }
137+
foreach ($line in $content) { $wc += $line.Split(' ').Length }
138138
$result.Add('Words', $wc)
139139
}
140140

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ As a result of the `Position` settings for these two parameters, you can use
131131
any of the following commands:
132132

133133
```powershell
134-
Get-ChildItem -Path c:\techdocs -Exclude *.ppt
135-
Get-ChildItem c:\techdocs -Exclude *.ppt
136-
Get-ChildItem -Exclude *.ppt -Path c:\techdocs
137-
Get-ChildItem -Exclude *.ppt c:\techdocs
134+
Get-ChildItem -Path C:\techdocs -Exclude *.ppt
135+
Get-ChildItem C:\techdocs -Exclude *.ppt
136+
Get-ChildItem -Exclude *.ppt -Path C:\techdocs
137+
Get-ChildItem -Exclude *.ppt C:\techdocs
138138
```
139139

140140
If you were to include another positional parameter without including the
@@ -237,7 +237,7 @@ information about common parameters, see
237237

238238
## See also
239239

240-
- [about_Command_syntax](about_Command_syntax.md)
240+
- [about_Command_Syntax](about_Command_Syntax.md)
241241
- [about_Comment_Based_Help](about_Comment_Based_Help.md)
242242
- [about_Functions_Advanced](about_Functions_Advanced.md)
243243
- [about_Parameters_Default_Values](about_Parameters_Default_Values.md)

0 commit comments

Comments
 (0)