Skip to content

Commit d93c68c

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 d93c68c

File tree

40 files changed

+184
-184
lines changed

40 files changed

+184
-184
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ for a module or if your help files are outdated, `Update-Help` downloads the new
4242
help files can be downloaded and installed from the internet or a file share.
4343

4444
Without parameters, `Update-Help` updates the help files for modules that support updateable help
45-
and are loaded in the session or installed in a location included in the `$env:PSModulePath`. For
45+
and are loaded in the session or installed in a location included in the `$Env:PSModulePath`. For
4646
more information, see [about_Updatable_Help](./About/about_Updatable_Help.md).
4747

4848
`Update-Help` checks the version of the help installed. If `Update-Help` can't find updated help
@@ -214,7 +214,7 @@ Get-Module -ListAvailable | Where-Object -Property HelpInfoUri
214214
```
215215

216216
```output
217-
Directory: C:\program files\powershell\6\Modules
217+
Directory: C:\Program Files\PowerShell\6\Modules
218218
219219
ModuleType Version Name PSEdition ExportedCommands
220220
---------- ------- ---- --------- ----------------
@@ -244,9 +244,9 @@ The script uses the **PSCustomObject** class and a hash table to create a custom
244244

245245
```powershell
246246
# Get-UpdateHelpVersion.ps1
247-
Param(
248-
[parameter(Mandatory=$false)]
249-
[String[]]
247+
param (
248+
[Parameter(Mandatory=$false)]
249+
[string[]]
250250
$Module
251251
)
252252
$HelpInfoNamespace = @{helpInfo='http://schemas.microsoft.com/powershell/help/2010/05'}
@@ -268,7 +268,7 @@ foreach ($mModule in $Modules)
268268
$mCulture=$mNode.Node.UICultureName
269269
$mVer=$mNode.Node.UICultureVersion
270270
271-
[PSCustomObject]@{"ModuleName"=$mName; "Culture"=$mCulture; "Version"=$mVer}
271+
[pscustomobject]@{"ModuleName"=$mName; "Culture"=$mCulture; "Version"=$mVer}
272272
}
273273
}
274274
}
@@ -419,15 +419,15 @@ are permitted. You can pipeline modules from the `Get-Module` cmdlet to the `Upd
419419

420420
The modules that you specify must be installed on the computer, but they don't have to be imported
421421
into the current session. You can specify any module in the session or any module that's installed
422-
in a location listed in the `$env:PSModulePath` environment variable.
422+
in a location listed in the `$Env:PSModulePath` environment variable.
423423

424424
A value of `*` (all) attempts to update help for all modules that are installed on the computer.
425425
Modules that don't support Updatable Help are included. This value might generate errors when the
426426
command encounters modules that don't support Updatable Help. Instead, run `Update-Help` without
427427
parameters.
428428

429429
The **Module** parameter of the `Update-Help` cmdlet doesn't accept the full path of a module file
430-
or module manifest file. To update help for a module that isn't in a `$env:PSModulePath` location,
430+
or module manifest file. To update help for a module that isn't in a `$Env:PSModulePath` location,
431431
import the module into the current session before you run the `Update-Help` command.
432432

433433
```yaml
@@ -618,7 +618,7 @@ for HTTP and port 443 for HTTPS.
618618
`Update-Help` supports all modules and the core PowerShell snap-ins. It doesn't support any other
619619
snap-ins.
620620

621-
To update help for a module in a location that isn't listed in the `$env:PSModulePath` environment
621+
To update help for a module in a location that isn't listed in the `$Env:PSModulePath` environment
622622
variable, import the module into the current session and then run an `Update-Help` command. Run
623623
`Update-Help` without parameters or use the **Module** parameter to specify the module name. The
624624
**Module** parameter of the `Update-Help` and `Save-Help` cmdlets doesn't accept the full path of a

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ The third command uses `Invoke-Command` cmdlet to run `Start-Job` in each of the
144144
The `Start-Job` command starts a job that runs the `Get-EventLog` command in the `$c`
145145
variable.
146146

147-
The command uses the **Using** scope modifier to indicate that the `$c` variable was defined on the
148-
local computer. The **Using** scope modifier is introduced in Windows PowerShell 3.0. For more
149-
information about the **Using** scope modifier, see
147+
The command uses the `Using:` scope modifier to indicate that the `$c` variable was defined on the
148+
local computer. The `Using:` scope modifier is introduced in Windows PowerShell 3.0. For more
149+
information about the `Using:` scope modifier, see
150150
[about_Remote_Variables](./about/about_Remote_Variables.md).
151151

152152
The fourth command uses `Invoke-Command` to run a `Wait-Job` command in the sessions. It uses the
@@ -184,7 +184,7 @@ The `$done` variable contains a job object that represents the job that ran on S
184184
### Example 5: Wait until one of several jobs finishes
185185

186186
```powershell
187-
Wait-Job -id 1,2,5 -Any
187+
Wait-Job -Id 1,2,5 -Any
188188
```
189189

190190
This command identifies three jobs by their IDs and waits until any one of them are in a terminating
@@ -222,7 +222,7 @@ These commands start a job that gets the Windows PowerShell script files that we
222222
in the last week.
223223

224224
The first command uses `Start-Job` to start a job on the local computer. The job runs a
225-
`Get-ChildItem` command that gets all of the files that have a .ps1 file name extension that were
225+
`Get-ChildItem` command that gets all of the files that have a `.ps1` file name extension that were
226226
added or updated in the last week.
227227

228228
The third command uses `Wait-Job` to wait until the job is in a terminating state. When the job
@@ -265,7 +265,7 @@ Get-Job
265265
```Output
266266
Id Name State HasMoreData Location Command
267267
-- ---- ----- ----------- -------- -------
268-
1 Job1 Completed True localhost,Server01.. get-service
268+
1 Job1 Completed True localhost,Server01.. Get-Service
269269
4 Job4 Completed True localhost dir | where
270270
```
271271

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -302,20 +302,20 @@ These commands list processes that have a working set greater than 250 megabytes
302302
filter the processes the same way and return the same output. Only the syntax is different.
303303

304304
```powershell
305-
Get-Process | Where-Object { $_.WorkingSet -GT 250MB }
305+
Get-Process | Where-Object { $_.WorkingSet -gt 250MB }
306306
Get-Process | Where-Object WorkingSet -GT 250MB
307307
```
308308

309309
### Example 3: Get processes based on process name
310310

311311
These commands get the processes that have a **ProcessName** property value that begins with the
312-
letter `p`. The **Match** operator lets you use regular expression matches.
312+
letter `p`. The `-match` operator and **Match** parameter let you use regular expression matches.
313313

314314
The commands filter the processes the same way and return the same output. Only the syntax is
315315
different.
316316

317317
```powershell
318-
Get-Process | Where-Object { $_.ProcessName -Match "^p.*" }
318+
Get-Process | Where-Object { $_.ProcessName -match "^p.*" }
319319
Get-Process | Where-Object ProcessName -Match "^p.*"
320320
```
321321

@@ -370,7 +370,7 @@ Get-ChildItem | Where-Object { $_.PSIsContainer }
370370
Get-ChildItem | Where-Object { !$_.PSIsContainer }
371371
# You cannot use the -not operator (!) in the comparison statement format
372372
# of the command.
373-
Get-ChildItem | Where-Object PSIsContainer -eq $false
373+
Get-ChildItem | Where-Object PSIsContainer -EQ $false
374374
```
375375

376376
### Example 6: Use multiple conditions
@@ -807,7 +807,7 @@ Accept wildcard characters: False
807807
Indicates that this cmdlet gets objects if the property value matches any of the specified values.
808808
For example:
809809

810-
`Get-Process | Where-Object -Property ProcessName -in -Value "Svchost", "TaskHost", "WsmProvHost"`
810+
`Get-Process | Where-Object -Property ProcessName -In -Value "Svchost", "TaskHost", "WsmProvHost"`
811811

812812
If the input is a single object, PowerShell converts it to a collection of one object.
813813

@@ -859,7 +859,7 @@ Accept wildcard characters: False
859859
Indicates that this cmdlet gets objects if the property value is an instance of the specified .NET
860860
type. Enclose the type name in square brackets.
861861

862-
For example, `Get-Process | Where-Object StartTime -Is [DateTime]`
862+
For example, `Get-Process | Where-Object StartTime -Is [datetime]`
863863

864864
This parameter was introduced in Windows PowerShell 3.0.
865865

@@ -880,7 +880,7 @@ Accept wildcard characters: False
880880
Indicates that this cmdlet gets objects if the property value isn't an instance of the specified
881881
.NET type.
882882

883-
For example, `Get-Process | where StartTime -IsNot [DateTime]`
883+
For example, `Get-Process | where StartTime -IsNot [datetime]`
884884

885885
This parameter was introduced in Windows PowerShell 3.0.
886886

@@ -1073,7 +1073,7 @@ Indicates that this cmdlet gets objects when the property value doesn't match th
10731073
expression. When the input is a single object, the matched value is saved in the `$Matches`
10741074
automatic variable.
10751075

1076-
For example: `Get-Process | Where-Object ProcessName -NotMatch "PowerShell"`
1076+
For example: `Get-Process | Where-Object ProcessName -NotMatch "powershell"`
10771077

10781078
This parameter was introduced in Windows PowerShell 3.0.
10791079

@@ -1161,7 +1161,7 @@ Windows PowerShell includes the following aliases for `Where-Object`:
11611161
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with
11621162
collections.
11631163

1164-
You can read more about these methods here [about_arrays](./About/about_Arrays.md)
1164+
You can read more about these methods here [about_Arrays](./About/about_Arrays.md)
11651165

11661166
## RELATED LINKS
11671167

reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ $DiskReads | Get-Counter -ComputerName Server01, Server02 -MaxSamples 10
190190
```Output
191191
Timestamp CounterSamples
192192
--------- --------------
193-
6/21/2019 10:51:04 \\Server01\logicaldisk(c:)\disk reads/sec :
193+
6/21/2019 10:51:04 \\Server01\logicaldisk(C:)\disk reads/sec :
194194
0
195195
196-
\\Server02\logicaldisk(c:)\disk reads/sec :
196+
\\Server02\logicaldisk(C:)\disk reads/sec :
197197
0.983050344269146
198198
```
199199

reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ is a property of the object with a non-null value.
230230
### Example 5: Get event logs from multiple servers
231231

232232
This example gets objects that represent the **Application** event logs on three computers:
233-
Server01, Server02, and Server03. The **ForEach** keyword is used because the **ComputerName**
233+
Server01, Server02, and Server03. The `foreach` keyword is used because the **ComputerName**
234234
parameter accepts only one value. For more information, see [about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md).
235235

236236
```powershell
237237
$S = 'Server01', 'Server02', 'Server03'
238-
ForEach ($Server in $S) {
238+
foreach ($Server in $S) {
239239
Get-WinEvent -ListLog Application -ComputerName $Server |
240240
Select-Object LogMode, MaximumSizeInBytes, RecordCount, LogName,
241-
@{name='ComputerName'; expression={$Server}} |
241+
@{Name='ComputerName'; Expression={$Server}} |
242242
Format-Table -AutoSize
243243
}
244244
```
@@ -252,7 +252,7 @@ Circular 15532032 5309 Application Server03
252252
```
253253

254254
The variable `$S` stores the names three servers: **Server01**, **Server02**, and **Server03**. The
255-
**ForEach** statement uses a loop to process each server, `($Server in $S)`. The script block in the
255+
`foreach` statement uses a loop to process each server, `($Server in $S)`. The script block in the
256256
curly braces (`{ }`) runs the `Get-WinEvent` command. The **ListLog** parameter specifies the
257257
**Application** log. The **ComputerName** parameter uses the variable `$Server` to get log
258258
information from each server.
@@ -671,7 +671,7 @@ Hash table queries have the following rules:
671671
- The **Path** value takes paths to `.etl`, `.evt`, and `.evtx` log files.
672672
- The **LogName**, **Path**, and **ProviderName** keys can be used in the same query.
673673
- The **UserID** key can take a valid security identifier (SID) or a domain account name that can be
674-
used to construct a valid **System.Security.Principal.NTAccount object**.
674+
used to construct a valid **System.Security.Principal.NTAccount** object.
675675
- The **Data** value takes event data in an unnamed field. For example, events in classic event
676676
logs.
677677

@@ -752,7 +752,7 @@ Accept wildcard characters: False
752752
### -Force
753753

754754
Gets debug and analytic logs, in addition to other event logs. The **Force** parameter is required
755-
to get a debug or analytic log when the value of the name parameter includes wildcard characters.
755+
to get a debug or analytic log when the value of the Name parameter includes wildcard characters.
756756

757757
By default, the `Get-WinEvent` cmdlet excludes these logs unless you specify the full name of a
758758
debug or analytic log.
@@ -816,7 +816,7 @@ cmdlet.
816816
> PowerShell does not limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet
817817
> queries the Windows API which has a limit of 256. This can make it difficult to filter through all
818818
> of your logs at one time. You can work around this by using a `foreach` loop to iterate through each
819-
> log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.Logname }`
819+
> log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.LogName }`
820820

821821
```yaml
822822
Type: System.String[]

reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ In version 0, the **IsMachine** field is a boolean value. In version 1, the **Is
4545
an unsigned integer value.
4646

4747
```powershell
48-
(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events | Where-Object Id -eq 8007
48+
(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events | Where-Object Id -EQ 8007
4949
```
5050

5151
```Output
@@ -94,9 +94,9 @@ to the **PolicyElaspedTimeInSeconds** field.
9494
This example shows how to create an event using a specific template version.
9595

9696
```powershell
97-
$Payload = @(300, [uint32]'0x8001011f', $env:USERNAME, 0, 1)
97+
$Payload = @(300, [uint32]'0x8001011f', $Env:USERNAME, 0, 1)
9898
New-WinEvent -ProviderName Microsoft-Windows-GroupPolicy -Id 8007 -Version 1 -Payload $Payload
99-
Get-winEvent -ProviderName Microsoft-Windows-GroupPolicy -MaxEvents 1
99+
Get-WinEvent -ProviderName Microsoft-Windows-GroupPolicy -MaxEvents 1
100100
```
101101

102102
```Output

reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ running PowerShell, the version of PowerShell, and the date and time. The transc
8585
the `\\Server01\Transcripts` file share.
8686

8787
```powershell
88-
$sharepath = '\\Server01\Transcripts'
89-
$username = $env:USERNAME
88+
$sharePath = '\\Server01\Transcripts'
89+
$username = $Env:USERNAME
9090
$hostname = hostname
9191
$version = $PSVersionTable.PSVersion.ToString()
92-
$datetime = Get-Date -f 'yyyyMMddHHmmss'
92+
$datetime = Get-Date -F 'yyyyMMddHHmmss'
9393
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
94-
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
94+
$Transcript = (Join-Path -Path $sharePath -ChildPath $filename).ToString()
9595
Start-Transcript
9696
```
9797

reference/5.1/Microsoft.PowerShell.Management/Clear-Content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Accept wildcard characters: False
272272

273273
Includes the command in the active transaction. This parameter is valid only when a transaction is
274274
in progress. For more information, see
275-
[about_transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
275+
[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
276276

277277
```yaml
278278
Type: System.Management.Automation.SwitchParameter
@@ -348,7 +348,7 @@ manipulate content. To clear items that are not considered to be content, such a
348348
the PowerShell Certificate or Registry providers, use `Clear-Item`.
349349

350350
The `Clear-Content` cmdlet is designed to work with the data exposed by any provider.
351-
To list the providers available in your session, type `Get-PsProvider`.
351+
To list the providers available in your session, type `Get-PSProvider`.
352352
For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
353353

354354
## RELATED LINKS

reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Windows PowerShell includes the following aliases for `Clear-Item`:
291291
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the
292292
**Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you
293293
can use `Clear-Item` to delete the content of items in the provider namespaces. To list the
294-
providers available in your session, type `Get-PsProvider`. For more information, see
294+
providers available in your session, type `Get-PSProvider`. For more information, see
295295
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
296296
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem
297297
provider does not support this cmdlet. To clear files, use the `Clear-Content`.

reference/5.1/Microsoft.PowerShell.Management/Debug-Process.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ verify that a debugger is installed and configured.
4747
### Example 1: Attach a debugger to a process on the computer
4848

4949
```powershell
50-
Debug-Process -Name Powershell
50+
Debug-Process -Name powershell
5151
```
5252

5353
This command attaches a debugger to the PowerShell process on the computer.
@@ -80,14 +80,14 @@ This command attaches a debugger to the processes that have process IDs 1132 and
8080
### Example 5: Use Get-Process to get a process then attach a debugger to it
8181

8282
```powershell
83-
Get-Process PowerShell | Debug-Process
83+
Get-Process powershell | Debug-Process
8484
```
8585

8686
This command attaches a debugger to the PowerShell processes on the computer. It uses the
8787
`Get-Process` cmdlet to get the PowerShell processes on the computer, and it uses a pipeline
8888
operator (`|`) to send the processes to the `Debug-Process` cmdlet.
8989

90-
To specify a particular PowerShell process, use the ID parameter of `Get-Process`.
90+
To specify a particular PowerShell process, use the **Id** parameter of `Get-Process`.
9191

9292
### Example 6: Attach a debugger to a current process on the local computer
9393

@@ -119,7 +119,7 @@ attaches the debuggers.
119119
### Example 8: Attach a debugger to a process that uses the InputObject parameter
120120

121121
```powershell
122-
$P = Get-Process PowerShell
122+
$P = Get-Process powershell
123123
Debug-Process -InputObject $P
124124
```
125125

@@ -249,7 +249,7 @@ This cmdlet returns no output.
249249
## NOTES
250250

251251
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI)
252-
Win32_Process class. For more information about this method, see
252+
**Win32_Process** class. For more information about this method, see
253253
[AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
254254

255255
## RELATED LINKS

0 commit comments

Comments
 (0)