Skip to content

Commit 099d90a

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 099d90a

40 files changed

+465
-465
lines changed

reference/5.1/CimCmdlets/Set-CimInstance.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ Accept wildcard characters: False
234234
235235
### -Namespace
236236
237-
Specifies the namespace for the CIM operation. The default namespace is root/cimv2. You can use tab
238-
completion to browse the list of namespaces, because PowerShell gets a list of namespaces from the
239-
local WMI server to provide the list of namespaces.
237+
Specifies the namespace for the CIM operation. The default namespace is **root/CIMV2**. You can use
238+
tab completion to browse the list of namespaces, because PowerShell gets a list of namespaces from
239+
the local WMI server to provide the list of namespaces.
240240
241241
```yaml
242242
Type: System.String
@@ -360,11 +360,11 @@ A URI consists of a prefix and a path to a resource. For example:
360360
By default, if you do not specify this parameter, the DMTF standard resource URI
361361
`http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/` is used and the class name is appended to it.
362362
363-
ResourceURI can only be used with CIM sessions created using the WSMan protocol, or when specifying
364-
the ComputerName parameter, which creates a CIM session using WSMan. If you specify this parameter
365-
without specifying the ComputerName parameter, or if you specify a CIM session created using DCOM
366-
protocol, you will get an error, because the DCOM protocol does not support the ResourceURI
367-
parameter.
363+
**ResourceUri** can only be used with CIM sessions created using the WSMan protocol, or when
364+
specifying the **ComputerName** parameter, which creates a CIM session using WSMan. If you specify
365+
this parameter without specifying the **ComputerName** parameter, or if you specify a CIM session
366+
created using DCOM protocol, you will get an error, because the DCOM protocol does not support the
367+
**ResourceUri** parameter.
368368
369369
If both the **ResourceUri** parameter and the **Filter** parameter are specified, the **Filter**
370370
parameter is ignored.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Provides a brief introduction to the PowerShell Desired State Configuration
150150

151151
### [about_Do](about_Do.md)
152152

153-
Runs a statement list one or more times, subject to a `While` or `Until`
153+
Runs a statement list one or more times, subject to a `while` or `until`
154154
condition.
155155

156156
### [about_Enum](about_Enum.md)
@@ -267,8 +267,8 @@ expression in the background without interacting with the current session.
267267

268268
### [about_Join](about_Join.md)
269269

270-
Describes how the join operator (-join) combines multiple strings into a single
271-
string.
270+
Describes how the join operator (`-join`) combines multiple strings into a
271+
single string.
272272

273273
### [about_Language_Keywords](about_Language_Keywords.md)
274274

@@ -377,7 +377,7 @@ command-line parameters and describes the syntax.
377377

378378
### [about_PowerShell_Ise_exe](about_PowerShell_Ise_exe.md)
379379

380-
Explains how to use the PowerShell_Ise.exe command-line tool.
380+
Explains how to use the `powershell_ise.exe` command-line tool.
381381

382382
### [about_Preference_Variables](about_Preference_Variables.md)
383383

@@ -389,8 +389,8 @@ Describes how to create and use a PowerShell profile.
389389

390390
### [about_Prompts](about_Prompts.md)
391391

392-
Describes the `Prompt` function and demonstrates how to create a custom
393-
`Prompt` function.
392+
Describes the `prompt` function and demonstrates how to create a custom
393+
`prompt` function.
394394

395395
### [about_Properties](about_Properties.md)
396396

@@ -417,7 +417,7 @@ The automatic variable that contains the current object in the pipeline object.
417417

418418
### [about_PSModulePath](about_PSModulePath.md)
419419

420-
This article the purpose and usage of the `$env:PSModulePath` environment
420+
This article the purpose and usage of the `$Env:PSModulePath` environment
421421
variable.
422422

423423
### [about_PSSession_Details](about_PSSession_Details.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Describes the features of PowerShell that use ANSI escape sequences
33
Locale: en-US
44
ms.date: 03/01/2023
55
schema: 2.0.0
6-
title: about_ANSI_terminals
6+
title: about_ANSI_Terminals
77
---
88
# about_ANSI_Terminals
99

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ current location is in the `Alias:` drive, the `-Path` parameter is not needed.
149149
This command also uses the `-Options` dynamic parameter to set the **AllScope**
150150
option on the alias. The `-Options` parameter is available in the `New-Item`
151151
cmdlet only when you are in the `Alias:` drive. The dot (`.`) indicates the
152-
current directory, which is the alias drive.
152+
current directory, which is the `Alias:` drive.
153153

154154
```
155155
PS Alias:\> New-Item -Path . -Name serv -Value Get-Service -Options "AllScope"
@@ -161,7 +161,7 @@ You can create an alias for any item that invokes a command.
161161
This command creates the `np` alias for `Notepad.exe`.
162162

163163
```powershell
164-
New-Item -Path Alias:np -Value c:\windows\notepad.exe
164+
New-Item -Path Alias:np -Value C:\windows\notepad.exe
165165
```
166166

167167
### Create an alias to a new function
@@ -177,7 +177,7 @@ When the command is complete, you can use either `CD32` or `go` to invoke the
177177
function.
178178

179179
```powershell
180-
function CD32 {Set-Location -Path c:\windows\system32}
180+
function CD32 {Set-Location -Path C:\windows\system32}
181181
Set-Item -Path Alias:go -Value CD32
182182
```
183183

@@ -313,7 +313,7 @@ Get-Help Get-ChildItem
313313
```
314314

315315
```powershell
316-
Get-Help Get-ChildItem -Path alias:
316+
Get-Help Get-ChildItem -Path Alias:
317317
```
318318

319319
## See also

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ following example, the negative value can't be cast to an unsigned integer, and
227227
the unsigned integer is too large to be cast to `Int32`:
228228

229229
```powershell
230-
([int32]::minvalue + [uint32]::maxvalue).GetType().FullName
230+
([int32]::MinValue + [uint32]::MaxValue).GetType().FullName
231231
```
232232

233233
```Output
@@ -241,10 +241,10 @@ The `System.Decimal` type is an exception. If either operand has the
241241
**Decimal** value is an error.
242242

243243
```powershell
244-
PS> [Decimal]::maxvalue
244+
PS> [decimal]::MaxValue
245245
79228162514264337593543950335
246246
247-
PS> [Decimal]::maxvalue + 1
247+
PS> [decimal]::MaxValue + 1
248248
RuntimeException: Value was either too large or too small for a Decimal.
249249
```
250250

@@ -454,12 +454,12 @@ InvalidOperation: A hash table can only be added to another hash table.
454454

455455
Although the addition operators are very useful, use the assignment operators
456456
to add elements to hash tables and arrays. For more information see
457-
[about_assignment_operators](about_Assignment_Operators.md). The following
457+
[about_Assignment_Operators](about_Assignment_Operators.md). The following
458458
examples use the `+=` assignment operator to add items to an array:
459459

460460
```powershell
461461
$array = @()
462-
(0..2).foreach{ $array += $_ }
462+
(0..2).ForEach{ $array += $_ }
463463
$array
464464
```
465465

@@ -497,15 +497,15 @@ The following examples show how to use the arithmetic operators in expressions
497497
with PowerShell commands:
498498

499499
```powershell
500-
(Get-Date) + (New-TimeSpan -day 1)
500+
(Get-Date) + (New-TimeSpan -Day 1)
501501
```
502502

503503
The parenthesis operator forces the evaluation of the `Get-Date` cmdlet and the
504504
evaluation of the `New-TimeSpan -Day 1` cmdlet expression, in that order. Both
505505
results are then added using the `+` operator.
506506

507507
```powershell
508-
Get-Process | Where-Object { ($_.ws * 2) -gt 50mb }
508+
Get-Process | Where-Object { ($_.WS * 2) -gt 50mb }
509509
```
510510

511511
```Output
@@ -519,7 +519,7 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
519519
967 30 58804 59496 416 930.97 2508 WINWORD
520520
```
521521

522-
In the above expression, each process working space (`$_.ws`) is multiplied by
522+
In the above expression, each process working space (`$_.WS`) is multiplied by
523523
`2`; and, the result, compared against `50mb` to see if it's greater than that.
524524

525525
## Bitwise operators
@@ -540,7 +540,7 @@ PowerShell supports the following bitwise operators.
540540
| `-band` | Bitwise AND | `10 -band 3` | 2 |
541541
| `-bor` | Bitwise OR (inclusive) | `10 -bor 3` | 11 |
542542
| `-bxor` | Bitwise OR (exclusive) | `10 -bxor 3` | 9 |
543-
| `-bnot` | Bitwise NOT | `-bNot 10` | -11 |
543+
| `-bnot` | Bitwise NOT | `-bnot 10` | -11 |
544544
| `-shl` | Shift-left | `102 -shl 2` | 408 |
545545
| `-shr` | Shift-right | `102 -shr 1` | 51 |
546546

@@ -587,7 +587,7 @@ For example, the binary complement of 0 is -1, the maximum unsigned integer
587587
(0xFFFFFFFF), and the binary complement of -1 is 0.
588588

589589
```powershell
590-
-bNot 10
590+
-bnot 10
591591
```
592592

593593
```Output

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ value in an array, type:
305305

306306
```powershell
307307
$a = 0..9
308-
for ($i = 0; $i -le ($a.length - 1); $i += 2) {
308+
for ($i = 0; $i -le ($a.Length - 1); $i += 2) {
309309
$a[$i]
310310
}
311311
```
@@ -346,11 +346,11 @@ In PowerShell, arrays have three properties that indicate the number of items
346346
contained in the array.
347347

348348
- **Count** - This property is the most commonly used property to determine the
349-
number of items in any collection, not just an array. It's an `[Int32]` type
349+
number of items in any collection, not just an array. It's an `[int32]` type
350350
value. In Windows PowerShell 5.1 (and older) **Count** alias property for
351351
**Length**.
352352

353-
- **Length** - This property is an `[Int32]` type value. This contains the same
353+
- **Length** - This property is an `[int32]` type value. This contains the same
354354
value as **Count**.
355355

356356
> [!NOTE]
@@ -359,7 +359,7 @@ contained in the array.
359359
> string is the number of characters in the string. But the **Count**
360360
> property is always `1`.
361361
362-
- **Longlength** - This property is an `[Int64]` type value. Use this property
362+
- **LongLength** - This property is an `[int64]` type value. Use this property
363363
for arrays containing more than 2,147,483,647 elements.
364364

365365
```powershell
@@ -408,8 +408,8 @@ Multidimensional arrays are stored in [row-major order][14]. The following
408408
example shows how to create a truly multidimensional array.
409409

410410
```powershell
411-
[string[,]]$rank2 = [string[,]]::New(3,2)
412-
$rank2.rank
411+
[string[,]]$rank2 = [string[,]]::new(3,2)
412+
$rank2.Rank
413413
$rank2.Length
414414
$rank2[0,0] = 'a'
415415
$rank2[0,1] = 'b'
@@ -487,7 +487,7 @@ True
487487
In this example, `$intA` is explicitly typed to contain integers.
488488

489489
```powershell
490-
[Int[]] $intA = 1, 2, 3
490+
[int] $intA = 1, 2, 3
491491
$intA.Clear()
492492
$intA
493493
```
@@ -552,7 +552,7 @@ For more information about the behavior of **ArgumentList**, see
552552

553553
The `ForEach()` method can be used to cast the elements to a different type;
554554
the following example shows how to convert a list of string dates to
555-
`[DateTime]` type.
555+
`[datetime]` type.
556556

557557
```powershell
558558
("1/1/2017", "2/1/2017", "3/1/2017").ForEach([datetime])
@@ -680,7 +680,7 @@ to return.
680680

681681
```powershell
682682
# Get the zip files in the current users profile, sorted by LastAccessTime
683-
$Zips = dir $env:userprofile -Recurse '*.zip' | Sort-Object LastAccessTime
683+
$Zips = dir $Env:USERPROFILE -Recurse '*.zip' | Sort-Object LastAccessTime
684684
# Get the least accessed file over 100MB
685685
$Zips.Where({$_.Length -gt 100MB}, 'Default', 1)
686686
```
@@ -876,7 +876,7 @@ create the `$t` array with all the elements in the `$a` array except for the
876876
value at index position 2, type:
877877

878878
```powershell
879-
$t = $a[0,1 + 3..($a.length - 1)]
879+
$t = $a[0,1 + 3..($a.Length - 1)]
880880
```
881881

882882
To combine two arrays into a single array, use the plus operator (`+`). The
@@ -1093,7 +1093,7 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
10931093
## See also
10941094

10951095
- [about_For][05]
1096-
- [about_ForEach][06]
1096+
- [about_Foreach][06]
10971097
- [about_Hash_Tables][07]
10981098
- [about_Member-Access_Enumeration][09]
10991099
- [about_Operators][11]
@@ -1106,7 +1106,7 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
11061106
[03]: about_Assignment_Operators.md
11071107
[04]: about_Booleans.md
11081108
[05]: about_For.md
1109-
[06]: about_ForEach.md
1109+
[06]: about_Foreach.md
11101110
[07]: about_Hash_Tables.md
11111111
[08]: about_Intrinsic_Members.md
11121112
[09]: about_Member-Access_Enumeration.md

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pipeline to a variable. For example, the following command sorts the services
8282
on the computer and then assigns the sorted services to the `$a` variable:
8383

8484
```powershell
85-
$a = Get-Service | Sort-Object -Property name
85+
$a = Get-Service | Sort-Object -Property Name
8686
```
8787

8888
You can also assign the value created by a statement to a variable, as in the

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ non-zero integer.
204204

205205
### `$foreach`
206206

207-
Contains the enumerator (not the resulting values) of a [ForEach][56] loop. The
208-
`$foreach` variable exists only while the `ForEach` loop is running; it's
207+
Contains the enumerator (not the resulting values) of a [foreach][56] loop. The
208+
`$foreach` variable exists only while the `foreach` loop is running; it's
209209
deleted after the loop is completed.
210210

211211
Enumerators contain properties and methods you can use to retrieve loop values
@@ -215,18 +215,18 @@ and change the current loop iteration. For more information, see
215215
### `$HOME`
216216

217217
Contains the full path of the user's home directory. This variable uses the
218-
value of the `"$env:USERPROFILE"` Windows environment variable, typically
218+
value of the `"$Env:USERPROFILE"` Windows environment variable, typically
219219
`C:\Users\<UserName>`.
220220

221221
> [!IMPORTANT]
222222
> Windows can redirect the location of the user's profile. This means that
223-
> `$HOME` may not have the same value as `"$env:HOMEDRIVE$env:HOMEPATH"`.
223+
> `$HOME` may not have the same value as `"$Env:HOMEDRIVE$Env:HOMEPATH"`.
224224
225225
### `$Host`
226226

227227
Contains an object that represents the current host application for PowerShell.
228228
You can use this variable to represent the current host in commands or to
229-
display or change the properties of the host, such as `$Host.version` or
229+
display or change the properties of the host, such as `$Host.Version` or
230230
`$Host.CurrentCulture`, or `$Host.UI.RawUI.BackGroundColor = "Red"`.
231231

232232
### $input
@@ -456,7 +456,7 @@ Test-Path $PROFILE
456456
Or, you can use it in a command to create a profile:
457457

458458
```powershell
459-
New-Item -ItemType file -Path $PROFILE -Force
459+
New-Item -ItemType File -Path $PROFILE -Force
460460
```
461461

462462
You can use it in a command to open the profile in **notepad.exe**:
@@ -550,7 +550,7 @@ available for use in module manifest files, whereas `$PSVersionTable` isn't.
550550
### `$PSHOME`
551551

552552
Contains the full path of the installation directory for PowerShell, typically,
553-
`$env:windir\System32\PowerShell\v1.0` in Windows systems. You can use this
553+
`$Env:windir\System32\PowerShell\v1.0` in Windows systems. You can use this
554554
variable in the paths of PowerShell files. For example, the following command
555555
searches the conceptual Help topics for the word **Help**:
556556

@@ -639,8 +639,8 @@ Contains a stack trace for the most recent error.
639639

640640
### `$switch`
641641

642-
Contains the enumerator not the resulting values of a `Switch` statement. The
643-
`$switch` variable exists only while the `Switch` statement is running; it's
642+
Contains the enumerator not the resulting values of a `switch` statement. The
643+
`$switch` variable exists only while the `switch` statement is running; it's
644644
deleted when the `switch` statement completes execution. For more information,
645645
see [about_Switch][71].
646646

@@ -1093,7 +1093,7 @@ Default (Current): End
10931093
[53]: about_CommonParameters.md
10941094
[54]: about_comparison_operators.md
10951095
[55]: about_Continue.md
1096-
[56]: about_ForEach.md
1096+
[56]: about_Foreach.md
10971097
[57]: about_Functions_Advanced_Methods.md
10981098
[58]: about_Functions_Advanced_Parameters.md
10991099
[59]: about_Functions_Advanced.md

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Examples:
9090
# Empty collections
9191
PS> [bool]@()
9292
False
93-
PS> [bool](Get-ChildItem | Where-Object Name -eq 'Non-existent-File.txt')
93+
PS> [bool](Get-ChildItem | Where-Object Name -EQ 'Non-existent-File.txt')
9494
False
9595
# Single-element collections
9696
PS> $a = @(0)

0 commit comments

Comments
 (0)