Skip to content

Commit e309f60

Browse files
Fix incorrect case/capitalization in ref docs (#11920)
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 a866a25 commit e309f60

40 files changed

+300
-300
lines changed

reference/5.1/Microsoft.PowerShell.Core/Disconnect-PSSession.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ OutputBufferingMode : Block
221221
AutoRestart : false
222222
SecurityDescriptorSddl : O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
223223
MaxMemoryPerShellMB : 1024
224-
MaxIdleTimeoutms : 2147483647
224+
MaxIdleTimeoutMs : 2147483647
225225
Uri : http://schemas.microsoft.com/powershell/microsoft.powershell
226226
SDKVersion : 2
227227
Name : microsoft.powershell
@@ -296,7 +296,7 @@ violation can go undetected while the session is in use.
296296
The fourth command uses the `Invoke-Command` cmdlet to run a `Get-PSSessionConfiguration` command
297297
for the `Microsoft.PowerShell` session configuration on the Server01 computer. The command uses the
298298
`Format-List` cmdlet to display all properties of the session configuration in a list.The output
299-
shows that the **MaxIdleTimeoutMS** property, which establishes the maximum permitted
299+
shows that the **MaxIdleTimeoutMs** property, which establishes the maximum permitted
300300
**IdleTimeout** value for sessions that use the session configuration, is `43200000` milliseconds
301301
(12 hours).
302302

@@ -321,7 +321,7 @@ which is measured in milliseconds. The output confirms that the command was succ
321321
Disconnects from sessions with the specified session ID. Type one or more IDs (separated by
322322
commas), or use the range operator (`..`) to specify a range of IDs.
323323

324-
To get the ID of a session, use the `Get-PSSession` cmdlet. The instance ID is stored in the **ID**
324+
To get the ID of a session, use the `Get-PSSession` cmdlet. The instance ID is stored in the **Id**
325325
property of the session.
326326

327327
```yaml
@@ -376,7 +376,7 @@ The instance ID is a GUID that uniquely identifies a session on a local or remot
376376
instance ID is unique, even across multiple sessions on multiple computers.
377377

378378
To get the instance ID of a session, use the `Get-PSSession` cmdlet. The instance ID is stored in
379-
the **InstanceID** property of the session.
379+
the **InstanceId** property of the session.
380380

381381
```yaml
382382
Type: System.Guid[]

reference/5.1/Microsoft.PowerShell.Core/Enter-PSSession.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ remote computer. When the session starts, the command prompt changes to include
117117
The second command gets the PowerShell process and redirects the output to the `Process.txt` file.
118118
The command is submitted to the remote computer, and the file is saved on the remote computer.
119119

120-
The third command uses the **Exit** keyword to end the interactive session and close the connection.
120+
The third command uses the `exit` keyword to end the interactive session and close the connection.
121121
The fourth command confirms that the Process.txt file is on the remote computer. A `Get-ChildItem`
122122
("dir") command on the local computer cannot find the file.
123123

124124
```powershell
125125
PS C:\> Enter-PSSession -ComputerName Server01
126126
[Server01]: PS C:\>
127-
[Server01]: PS C:\> Get-Process PowerShell > C:\ps-test\Process.txt
127+
[Server01]: PS C:\> Get-Process powershell > C:\ps-test\Process.txt
128128
[Server01]: PS C:\> exit
129129
PS C:\>
130130
PS C:\> dir C:\ps-test\Process.txt
131131
Get-ChildItem : Cannot find path 'C:\ps-test\Process.txt' because it does not exist.
132132
At line:1 char:4
133-
+ dir <<<< c:\ps-test\Process.txt
133+
+ dir <<<< C:\ps-test\Process.txt
134134
```
135135

136136
This command shows how to work in an interactive session with a remote computer.
@@ -169,7 +169,7 @@ This example shows how to start and stop an interactive session. The first comma
169169
`Enter-PSSession` cmdlet to start an interactive session with the Server01 computer.
170170

171171
The second command uses the `Exit-PSSession` cmdlet to end the session. You can also use the
172-
**Exit** keyword to end the interactive session. `Exit-PSSession` and **Exit** have the same effect.
172+
`exit` keyword to end the interactive session. `Exit-PSSession` and `exit` have the same effect.
173173

174174
## PARAMETERS
175175

@@ -484,7 +484,7 @@ Specifies the instance ID of an existing session. `Enter-PSSession` uses the spe
484484
the interactive session.
485485

486486
The instance ID is a GUID. To find the instance ID of a session, use the `Get-PSSession` cmdlet. You
487-
can also use the **Session**, **Name**, or **ID** parameters to specify an existing session. Or, you
487+
can also use the **Session**, **Name**, or **Id** parameters to specify an existing session. Or, you
488488
can use the **ComputerName** parameter to start a temporary session.
489489

490490
```yaml
@@ -505,7 +505,7 @@ Specifies the friendly name of an existing session. `Enter-PSSession` uses the s
505505
the interactive session.
506506

507507
If the name that you specify matches more than one session, the command fails. You can also use the
508-
**Session**, **InstanceID**, or **ID** parameters to specify an existing session. Or, you can use
508+
**Session**, **InstanceId**, or **Id** parameters to specify an existing session. Or, you can use
509509
the **ComputerName** parameter to start a temporary session.
510510

511511
To establish a friendly name for a session, use the **Name** parameter of the `New-PSSession`
@@ -571,15 +571,15 @@ Accept wildcard characters: False
571571
### -Session
572572

573573
Specifies a PowerShell session (**PSSession**) to use for the interactive session. This parameter
574-
takes a session object. You can also use the **Name**, **InstanceID**, or **ID** parameters to
574+
takes a session object. You can also use the **Name**, **InstanceId**, or **Id** parameters to
575575
specify a **PSSession**.
576576

577577
Enter a variable that contains a session object or a command that creates or gets a session object,
578578
such as a `New-PSSession` or `Get-PSSession` command. You can also pipe a session object to
579579
`Enter-PSSession`. You can submit only one **PSSession** by using this parameter. If you enter a
580580
variable that contains more than one **PSSession**, the command fails.
581581

582-
When you use `Exit-PSSession` or the **EXIT** keyword, the interactive session ends, but the
582+
When you use `Exit-PSSession` or the `exit` keyword, the interactive session ends, but the
583583
**PSSession** that you created remains open and available for use.
584584

585585
```yaml

reference/5.1/Microsoft.PowerShell.Core/Exit-PSSession.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The third command uses `Exit-PSSession` to stop the interactive session.
6969
The final command displays the **PSSession** in the `$s` variable. The **State** property shows the
7070
**PSSession** is still open and available for use.
7171

72-
### Example 3: Use the Exit keyword to stop a session
72+
### Example 3: Use the `exit` keyword to stop a session
7373

7474
```powershell
7575
PS C:\> Enter-PSSession -ComputerName Server01

reference/5.1/Microsoft.PowerShell.Core/ForEach-Object.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ command.
4646
`Get-Process | ForEach-Object {$_.ProcessName}`
4747

4848
`ForEach-Object` supports the `begin`, `process`, and `end` blocks as described in
49-
[about_functions](about/about_functions.md#piping-objects-to-functions).
49+
[about_Functions](about/about_functions.md#piping-objects-to-functions).
5050

5151
> [!NOTE]
5252
> The script blocks run in the caller's scope. Therefore, the blocks have access to variables in
@@ -88,7 +88,7 @@ Get-ChildItem $PSHOME |
8888

8989
If the object isn't a directory, the script block gets the name of the file, divides the value of
9090
its **Length** property by 1024, and adds a space (" ") to separate it from the next entry. The
91-
cmdlet uses the **PSISContainer** property to determine whether an object is a directory.
91+
cmdlet uses the **PSIsContainer** property to determine whether an object is a directory.
9292

9393
### Example 3: Operate on the most recent System events
9494

@@ -163,7 +163,7 @@ the **MemberName** parameter of the `ForEach-Object` cmdlet.
163163

164164
```powershell
165165
Get-Module -ListAvailable | ForEach-Object -MemberName Path
166-
Get-Module -ListAvailable | Foreach Path
166+
Get-Module -ListAvailable | foreach Path
167167
```
168168

169169
The second command is equivalent to the first. It uses the `Foreach` alias of the `ForEach-Object`
@@ -185,7 +185,7 @@ are equivalent and interchangeable. The output is the same for all three cases.
185185
"Microsoft.PowerShell.Core", "Microsoft.PowerShell.Host" |
186186
ForEach-Object -MemberName Split -ArgumentList "."
187187
"Microsoft.PowerShell.Core", "Microsoft.PowerShell.Host" |
188-
Foreach Split "."
188+
foreach Split "."
189189
```
190190

191191
```Output
@@ -204,7 +204,7 @@ argument.
204204
The second command uses the **MemberName** parameter to specify the **Split** method and the
205205
**ArgumentList** parameter to identify the dot (`.`) as the split delimiter.
206206

207-
The third command uses the **Foreach** alias of the `ForEach-Object` cmdlet and omits the names of
207+
The third command uses the `foreach` alias of the `ForEach-Object` cmdlet and omits the names of
208208
the **MemberName** and **ArgumentList** parameters, which are optional.
209209

210210
### Example 8: Using ForEach-Object with two script blocks
@@ -354,7 +354,7 @@ Specifies the name of the member property to get or the member method to call. T
354354
instance members, not static members.
355355

356356
Wildcard characters are permitted, but work only if the resulting string resolves to a unique value.
357-
For example, if you run `Get-Process | ForEach -MemberName *Name`, the wildcard pattern matches more
357+
For example, if you run `Get-Process | foreach -MemberName *Name`, the wildcard pattern matches more
358358
than one member causing the command to fail.
359359

360360
This parameter was introduced in Windows PowerShell 3.0.
@@ -471,12 +471,12 @@ Windows PowerShell includes the following aliases for `ForEach-Object`:
471471
- `%`
472472
- `foreach`
473473

474-
The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe
475-
input to a **Foreach** statement. For more information about the **Foreach** statement, see
474+
The `ForEach-Object` cmdlet works much like the `foreach` statement, except that you cannot pipe
475+
input to a `foreach` statement. For more information about the `foreach` statement, see
476476
[about_Foreach](./About/about_Foreach.md).
477477

478478
Starting in PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You
479-
can read more about these new methods here [about_arrays](./About/about_Arrays.md)
479+
can read more about these new methods here [about_Arrays](./About/about_Arrays.md)
480480

481481
## RELATED LINKS
482482

reference/5.1/Microsoft.PowerShell.Core/Get-Command.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ have been imported into the current session, use the **ListImported** parameter.
4141

4242
Without parameters, `Get-Command` gets all the cmdlets, functions, and aliases installed on the
4343
computer. `Get-Command *` gets all types of commands, including all the non-PowerShell files in the
44-
Path environment variable (`$env:PATH`), which it lists in the Application command type.
44+
PATH environment variable (`$Env:PATH`), which it lists in the Application command type.
4545

4646
`Get-Command` that uses the exact name of the command, without wildcard characters, automatically
4747
imports the module that contains the command so that you can use the command immediately. To enable,
@@ -114,7 +114,7 @@ This command uses the **ArgumentList** and **Syntax** parameters to get the synt
114114
the Certificate Provider adds to the session.
115115

116116
```powershell
117-
Get-Command -Name Get-Childitem -Args Cert: -Syntax
117+
Get-Command -Name Get-ChildItem -Args Cert: -Syntax
118118
```
119119

120120
When you compare the syntax displayed in the output with the syntax that's displayed when you omit
@@ -154,7 +154,7 @@ cmdlet by another cmdlet or a provider.
154154
### Example 8: Get all commands of all types
155155

156156
This command gets all commands of all types on the local computer, including executable files in the
157-
paths of the **Path** environment variable (`$env:PATH`).
157+
paths of the **PATH** environment variable (`$Env:PATH`).
158158

159159
```powershell
160160
Get-Command *
@@ -262,7 +262,7 @@ code defines the **OutputType** attribute for the cmdlet.
262262
### Example 14: Get cmdlets that take a specific object type as input
263263

264264
```powershell
265-
Get-Command -ParameterType (((Get-NetAdapter)[0]).PSTypeNames)
265+
Get-Command -ParameterType (((Get-NetAdapter)[0]).pstypenames)
266266
```
267267

268268
```Output
@@ -278,11 +278,11 @@ Function Set-NetAdapter NetAdapter
278278
This command finds cmdlets that take net adapter objects as input. You can use this command format
279279
to find the cmdlets that accept the type of objects that any command returns.
280280

281-
The command uses the **PSTypeNames** intrinsic property of all objects, which gets the types that
282-
describe the object. To get the **PSTypeNames** property of a net adapter, and not the
283-
**PSTypeNames** property of a collection of net adapters, the command uses array notation to get the
284-
first net adapter that the cmdlet returns. To get the **PSTypeNames** property of a net adapter, and
285-
not the **PSTypeNames** property of a collection of net adapters, the command uses array notation to
281+
The command uses the **pstypenames** intrinsic property of all objects, which gets the types that
282+
describe the object. To get the **pstypenames** property of a net adapter, and not the
283+
**pstypenames** property of a collection of net adapters, the command uses array notation to get the
284+
first net adapter that the cmdlet returns. To get the **pstypenames** property of a net adapter, and
285+
not the **pstypenames** property of a collection of net adapters, the command uses array notation to
286286
get the first net adapter that the cmdlet returns.
287287

288288
## PARAMETERS
@@ -352,15 +352,15 @@ The acceptable values for this parameter are:
352352

353353
- `All`: Gets all command types. This parameter value is the equivalent of `Get-Command *`.
354354

355-
- `Application`: Searches folders in the `$env:PATH` environment variable for non-PowerShell
355+
- `Application`: Searches folders in the `$Env:PATH` environment variable for non-PowerShell
356356
executable files. On Windows, executable files have a file extension that is listed in the
357-
`$env:PATHEXT` environment variable. For more information, see
357+
`$Env:PATHEXT` environment variable. For more information, see
358358
[about_Environment_Variables](About/about_Environment_Variables.md).
359359

360360
- `Cmdlet`: Gets all cmdlets.
361361

362-
- `ExternalScript`: Gets all `.ps1` files in the paths listed in the **Path** environment variable
363-
(`$env:PATH`).
362+
- `ExternalScript`: Gets all `.ps1` files in the paths listed in the **PATH** environment variable
363+
(`$Env:PATH`).
364364

365365
- `Filter` and `Function`: Gets all PowerShell advanced and simple functions and filters.
366366

reference/5.1/Microsoft.PowerShell.Core/Get-Help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ script, or workflow, such as `Get-Member`, a conceptual article name, such as `a
472472
alias, such as `ls`. Wildcard characters are permitted in cmdlet and provider names, but you can't
473473
use wildcard characters to find the names of function help and script help articles.
474474

475-
To get help for a script that isn't located in a path that's listed in the `$env:Path` environment
475+
To get help for a script that isn't located in a path that's listed in the `$Env:PATH` environment
476476
variable, type the script's path and file name.
477477

478478
If you enter the exact name of a help article, `Get-Help` displays the article contents.

reference/5.1/Microsoft.PowerShell.Core/Get-History.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ saves it in the History.csv file. The file includes the data that is displayed w
6262
history as a list. This includes the status and start and end times of the command.
6363

6464
```powershell
65-
Get-History -ID 7 -Count 5 | Export-Csv -Path History.csv
65+
Get-History -Id 7 -Count 5 | Export-Csv -Path History.csv
6666
```
6767

6868
### Example 4: Display the most recent command

reference/5.1/Microsoft.PowerShell.Core/Get-Job.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Get-Job
9595
```Output
9696
Id Name PSJobTypeName State HasMoreData Location Command
9797
-- ---- ------------- ----- ----------- -------- -------
98-
1 Job1 BackgroundJob Completed True localhost $env:COMPUTERNAME
98+
1 Job1 BackgroundJob Completed True localhost $Env:COMPUTERNAME
9999
```
100100

101101
### Example 2: Stop a job by using an instance ID
@@ -113,7 +113,7 @@ instance ID of the job.
113113

114114
```powershell
115115
$j = Get-Job -Name Job1
116-
$ID = $j.InstanceID
116+
$ID = $j.InstanceId
117117
$ID
118118
```
119119

@@ -179,7 +179,7 @@ Get-Job -Name Job*
179179
```Output
180180
Id Name PSJobTypeName State HasMoreData Location Command
181181
-- ---- ------------- ----- ----------- -------- -------
182-
1 Job1 BackgroundJob Completed True localhost $env:COMPUTERNAME
182+
1 Job1 BackgroundJob Completed True localhost $Env:COMPUTERNAME
183183
```
184184

185185
### Example 7: Use a job object to represent the job in a command
@@ -316,7 +316,7 @@ PS> Get-Job | Format-List -Property *
316316
HasMoreData : False
317317
StatusMessage :
318318
Location : localhost
319-
Command : get-process
319+
Command : Get-Process
320320
JobStateInfo : Failed
321321
Finished : System.Threading.ManualReset
322322
EventInstanceId : fb792295-1318-4f5d-8ac8-8a89c5261507
@@ -331,7 +331,7 @@ Debug : {}
331331
Warning : {}
332332
StateChanged :
333333
334-
PS> (Get-Job -Name job2).JobStateInfo.Reason
334+
PS> (Get-Job -Name Job2).JobStateInfo.Reason
335335
Connecting to remote server using WSManCreateShellEx api failed. The async callback gave the
336336
following error message: Access is denied.
337337
```
@@ -342,15 +342,15 @@ This example shows how to use the **Filter** parameter to get a workflow job. Th
342342
parameter, introduced in Windows PowerShell 3.0 is valid only on custom job types, such as workflow
343343
jobs and scheduled jobs.
344344

345-
The first command uses the **Workflow** keyword to create the WFProcess workflow. The second command
345+
The first command uses the `workflow` keyword to create the WFProcess workflow. The second command
346346
uses the **AsJob** parameter of the WFProcess workflow to run the workflow as a background job. It
347347
uses the **JobName** parameter of the workflow to specify a name for the job, and the
348348
**PSPrivateMetadata** parameter of the workflow to specify a custom ID. The third command uses the
349349
**Filter** parameter of `Get-Job` to get the job by custom ID that was specified in the
350350
**PSPrivateMetadata** parameter.
351351

352352
```powershell
353-
PS> Workflow WFProcess {Get-Process}
353+
PS> workflow WFProcess {Get-Process}
354354
PS> WFProcess -AsJob -JobName WFProcessJob -PSPrivateMetadata @{MyCustomId = 92107}
355355
PS> Get-Job -Filter @{MyCustomId = 92107}
356356
Id Name State HasMoreData Location Command

0 commit comments

Comments
 (0)