Skip to content

Commit 67bf087

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 67bf087

40 files changed

+192
-192
lines changed

reference/5.1/Microsoft.PowerShell.Utility/Out-String.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ parameter to direct `Out-String` to return one line at a time or create an array
2929
cmdlet lets you search and manipulate string output as you would in traditional shells when object
3030
manipulation is less convenient.
3131

32-
PowerShell also adds the `OSS` function that calls `Out-String -Stream` as a shorthand way to use
32+
PowerShell also adds the `oss` function that calls `Out-String -Stream` as a shorthand way to use
3333
`Out-String` in a pipeline.
3434

3535
## EXAMPLES

reference/5.1/Microsoft.PowerShell.Utility/Register-EngineEvent.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This example registers for a PowerShell engine event on two remote computers.
4747
```powershell
4848
$S = New-PSSession -ComputerName "Server01, Server02"
4949
Invoke-Command -Session $S {
50-
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Forward
50+
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PSEngineEvent]::Exiting) -Forward
5151
}
5252
```
5353

@@ -81,13 +81,13 @@ data to a text file.
8181

8282
```powershell
8383
Register-EngineEvent -SourceIdentifier MyEventSource -Action {
84-
"Event: {0}" -f $Event.MessageData | Out-File c:\temp\MyEvents.txt -Append
84+
"Event: {0}" -f $Event.MessageData | Out-File C:\temp\MyEvents.txt -Append
8585
}
8686
8787
Start-Job -Name TestJob -ScriptBlock {
88-
While ($true) {
88+
while ($true) {
8989
Register-EngineEvent -SourceIdentifier MyEventSource -Forward
90-
Start-Sleep -seconds 2
90+
Start-Sleep -Seconds 2
9191
"Doing some work..."
9292
$newEventSplat = @{
9393
SourceIdentifier = 'MyEventSource'
@@ -96,7 +96,7 @@ Start-Job -Name TestJob -ScriptBlock {
9696
New-Event @newEventSplat
9797
}
9898
}
99-
Start-Sleep -seconds 4
99+
Start-Sleep -Seconds 4
100100
Get-EventSubscriber
101101
Get-Job
102102
```
@@ -126,7 +126,7 @@ This is a continuation of Example 3. In this example we wait for 10 seconds to l
126126
occur. Then we unregister the event subscription.
127127

128128
```powershell
129-
PS> Start-Sleep -seconds 10
129+
PS> Start-Sleep -Seconds 10
130130
PS> Get-EventSubscriber | Unregister-Event
131131
PS> Get-Job
132132

reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ $objectEventArgs = @{
150150
}
151151
$Job = Register-ObjectEvent @objectEventArgs
152152
$Job | Format-List -Property *
153-
& $Job.module {$Random}
154-
& $Job.module {$Random}
153+
& $Job.Module {$Random}
154+
& $Job.Module {$Random}
155155
```
156156

157157
```Output

reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ reached. To turn off this optimizing behavior, use the **Wait** parameter.
5757

5858
### Example 1: Select objects by property
5959

60-
This example creates objects that have the **Name**, **ID**, and working set (**WS**) properties of
60+
This example creates objects that have the **Name**, **Id**, and working set (**WS**) properties of
6161
process objects.
6262

6363
```powershell
@@ -170,7 +170,7 @@ event is 0. The index of the last event is the number of items in `$a` minus 1.
170170

171171
```powershell
172172
$a = Get-EventLog -LogName "Windows PowerShell"
173-
$a | Select-Object -Index 0, ($A.count - 1)
173+
$a | Select-Object -Index 0, ($A.Count - 1)
174174
```
175175

176176
### Example 7: Select all but the first object
@@ -310,7 +310,7 @@ ati2evxx Thursday
310310
# Add a custom property to calculate the size in KiloBytes of each FileInfo
311311
# object you pass in. Use the pipeline variable to divide each file's length by
312312
# 1 KiloBytes
313-
$size = @{label="Size(KB)";expression={$_.length/1KB}}
313+
$size = @{Label="Size(KB)";Expression={$_.Length/1KB}}
314314
# Create an additional calculated property with the number of Days since the
315315
# file was last accessed. You can also shorten the key names to be 'l', and 'e',
316316
# or use Name instead of Label.
@@ -337,8 +337,8 @@ value for that key.
337337

338338
```powershell
339339
@{ name = 'a' ; weight = 7 } | Select-Object -Property @(
340-
@{ label = 'Name' ; expression = { $_.name } }
341-
@{ label = 'Weight' ; expression = { $_.weight } }
340+
@{ Label = 'Name' ; Expression = { $_.name } }
341+
@{ Label = 'Weight' ; Expression = { $_.weight } }
342342
)
343343
```
344344

@@ -355,9 +355,9 @@ This example demonstrates the side-effect of using the **ExpandProperty** parame
355355
**NoteProperty** members.
356356

357357
```powershell
358-
PS> $object = [PSCustomObject]@{
358+
PS> $object = [pscustomobject]@{
359359
name = 'USA'
360-
children = [PSCustomObject]@{
360+
children = [pscustomobject]@{
361361
name = 'Southwest'
362362
}
363363
}
@@ -391,9 +391,9 @@ You can avoid the side-effect of using the **ExpandProperty** parameter by creat
391391
copying the properties from the input object.
392392

393393
```powershell
394-
PS> $object = [PSCustomObject]@{
394+
PS> $object = [pscustomobject]@{
395395
name = 'USA'
396-
children = [PSCustomObject]@{
396+
children = [pscustomobject]@{
397397
name = 'Southwest'
398398
}
399399
}
@@ -404,12 +404,12 @@ name children
404404
USA @{name=Southwest}
405405
406406
# Create a new object with selected properties
407-
PS> $newobject = [PSCustomObject]@{
407+
PS> $newObject = [pscustomobject]@{
408408
country = $object.name
409409
children = $object.children
410410
}
411411
412-
PS> $newobject
412+
PS> $newObject
413413
414414
country children
415415
------- --------

reference/5.1/Microsoft.PowerShell.Utility/Select-String.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Select-String [-Pattern] <String[]> -LiteralPath <String[]> [-SimpleMatch] [-Cas
4242
## DESCRIPTION
4343

4444
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input
45-
strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
45+
strings and files. You can use `Select-String` similar to `grep` in Unix or `findstr.exe` in
4646
Windows.
4747

4848
`Select-String` is based on lines of text. By default, `Select-String` finds the first match in each
@@ -148,7 +148,7 @@ C:\Windows\System32\WindowsPowerShell\v1.0\en-US\about_ActivityCommonParameters.
148148
C:\Windows\System32\WindowsPowerShell\v1.0\en-US\about_ActivityCommonParameters.help.txt:33: about_CommonParameters.
149149
```
150150

151-
The function is created on the PowerShell command line. The `Function` command uses the name
151+
The function is created on the PowerShell command line. The `function` keyword uses the name
152152
`Search-Help`. Press **Enter** to begin adding statements to the function. From the `>>` prompt,
153153
add each statement and press **Enter** as shown in the example. After the closing bracket is added,
154154
you're returned to a PowerShell prompt.
@@ -171,17 +171,17 @@ object in the pipeline. For more information, see [about_Automatic_Variables](..
171171

172172
```powershell
173173
$Events = Get-WinEvent -LogName Application -MaxEvents 50
174-
$Events | Select-String -InputObject {$_.message} -Pattern 'Failed'
174+
$Events | Select-String -InputObject {$_.Message} -Pattern 'Failed'
175175
```
176176

177177
The `Get-WinEvent` cmdlet uses the **LogName** parameter to specify the Application log. The
178178
**MaxEvents** parameter gets the 50 most recent events from the log. The log content is stored in
179179
the variable named `$Events`.
180180

181181
The `$Events` variable is sent down the pipeline to the `Select-String` cmdlet. `Select-String` uses
182-
the **InputObject** parameter. The `$_` variable represents the current object and `message` is a
182+
the **InputObject** parameter. The `$_` variable represents the current object and `Message` is a
183183
property of the event. The **Pattern** parameter specifies the string **Failed** and searches for
184-
matches in `$_.message`. `Select-String` displays the output in the PowerShell console.
184+
matches in `$_.Message`. `Select-String` displays the output in the PowerShell console.
185185

186186
### Example 6: Find a string in subdirectories
187187

@@ -685,7 +685,7 @@ Windows PowerShell includes the following aliases for `Select-String`:
685685

686686
- `sls`
687687

688-
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
688+
`Select-String` is similar to `grep` in Unix or `findstr.exe` in Windows.
689689

690690
> [!NOTE]
691691
> According to

reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ file. For example, there is a **Count** property that is an alias of the **Lengt
9292

9393
### Example 2: Input an XML document
9494

95-
This example shows how to use the **XML** parameter to provide an XML document to the `Select-Xml`
95+
This example shows how to use the **Xml** parameter to provide an XML document to the `Select-Xml`
9696
cmdlet.
9797

9898
The `Get-Content` cmdlet gets the content of the `Types.ps1xml` file and saves it in the `$Types`
@@ -124,10 +124,10 @@ information about Updatable Help, see
124124
The `Select-Xml` cmdlet searches the XML files for cmdlet names by finding `Command:Name` element
125125
anywhere in the files. The results are stored in the `$Xml` variable. `Select-Xml` returns a
126126
**SelectXmlInfo** object that has a **Node** property, which is a **System.Xml.XmlElement** object.
127-
The **Node** property has an **InnerXML** property that contains the actual XML that is retrieved.
127+
The **Node** property has an **InnerXml** property that contains the actual XML that is retrieved.
128128

129129
The `$Xml` variable is piped to the `Format-Table` cmdlet. The `Format-Table` command uses a
130-
calculated property to get the **Node.InnerXML** property of each object in the `$Xml` variable,
130+
calculated property to get the **Node.InnerXml** property of each object in the `$Xml` variable,
131131
trim the white space before and after the text, and display it in the table, along with the **Path**
132132
to the source file.
133133

@@ -138,21 +138,21 @@ $Namespace = @{
138138
dev = "http://schemas.microsoft.com/maml/dev/2004/10"
139139
}
140140
141-
$Path = "$PSHOME\en-us\*dll-Help.xml"
141+
$Path = "$PSHOME\en-US\*dll-Help.xml"
142142
$Xml = Select-Xml -Path $Path -Namespace $Namespace -XPath "//command:name"
143-
$Xml | Format-Table @{Label="Name"; Expression= {($_.node.innerxml).trim()}}, Path -AutoSize
143+
$Xml | Format-Table @{Label="Name"; Expression= {($_.Node.InnerXml).Trim()}}, Path -AutoSize
144144
```
145145

146146
```Output
147147
Name Path
148148
---- ----
149-
Export-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
150-
Get-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
151-
Get-WinEvent C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
152-
Import-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
153-
Add-Computer C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Management.dll-Help.xml
154-
Add-Content C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Management.dll-Help.xml
155-
Checkpoint-Computer C:\Windows\system32\WindowsPowerShell\v1.0\en-us\Microsoft.PowerShell.Commands.Management.dll-Help.xml
149+
Export-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
150+
Get-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
151+
Get-WinEvent C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
152+
Import-Counter C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Diagnostics.dll-Help.xml
153+
Add-Computer C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Management.dll-Help.xml
154+
Add-Content C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Management.dll-Help.xml
155+
Checkpoint-Computer C:\Windows\system32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Management.dll-Help.xml
156156
...
157157
```
158158

@@ -187,14 +187,14 @@ $Xml = @"
187187
</Book>
188188
"@
189189
190-
Select-Xml -Content $Xml -XPath "//edition" | foreach {$_.node.InnerXML}
190+
Select-Xml -Content $Xml -XPath "//edition" | foreach {$_.Node.InnerXml}
191191
192192
En.Book1.com
193193
Ge.Book1.Com
194194
Fr.Book1.com
195195
Pl.Book1.com
196196
197-
$Xml | Select-Xml -XPath "//edition" | foreach {$_.node.InnerXML}
197+
$Xml | Select-Xml -XPath "//edition" | foreach {$_.Node.InnerXml}
198198
199199
En.Book1.com
200200
Ge.Book1.Com

reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function. For more information, see
172172
[about_Functions](../Microsoft.PowerShell.Core/about/about_Functions.md).
173173

174174
```
175-
Function CD32 {Set-Location -Path C:\Windows\System32}
175+
function CD32 {Set-Location -Path C:\Windows\System32}
176176
177177
Set-Alias -Name Go -Value CD32
178178
```
@@ -260,7 +260,7 @@ Accept wildcard characters: False
260260
261261
Sets the **Option** property value of the alias. Values such as `ReadOnly` and `Constant`
262262
protect an alias from unintended changes. To see the **Option** property of all aliases in the
263-
session, type `Get-Alias | Format-Table -Property Name, Options -Autosize`.
263+
session, type `Get-Alias | Format-Table -Property Name, Options -AutoSize`.
264264

265265
The acceptable values for this parameter are as follows:
266266

reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ HitCount : 0
159159
Action :
160160
161161
function CheckLog {
162-
>> get-eventlog -log Application |
163-
>> where {($_.source -like "TestApp") -and ($_.Message -like "*failed*")}
162+
>> Get-EventLog -Log Application |
163+
>> where {($_.Source -like "TestApp") -and ($_.Message -like "*failed*")}
164164
>>}
165165
>>
166166
PS> Checklog
@@ -220,9 +220,9 @@ tasks, such as testing or logging.
220220
If this parameter is omitted, or no action is specified, execution stops at the breakpoint, and the
221221
debugger starts.
222222

223-
When the **Action** parameter is used, the Action script block runs at each breakpoint. Execution does
224-
not stop unless the script block includes the Break keyword. If you use the Continue keyword in the
225-
script block, execution resumes until the next breakpoint.
223+
When the **Action** parameter is used, the Action script block runs at each breakpoint. Execution
224+
does not stop unless the script block includes the `break` keyword. If you use the `continue`
225+
keyword in the script block, execution resumes until the next breakpoint.
226226

227227
For more information, see [about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md),
228228
[about_Break](../Microsoft.PowerShell.Core/About/about_Break.md), and
@@ -272,7 +272,7 @@ Sets a command breakpoint. Enter cmdlet names, such as `Get-Process`, or functio
272272
are permitted.
273273

274274
Execution stops just before each instance of each command is executed. If the command is a function,
275-
execution stops each time the function is called and at each BEGIN, PROCESS, and END section.
275+
execution stops each time the function is called and at each `begin`, `process`, and `end` block.
276276

277277
```yaml
278278
Type: System.String[]

reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Set-TraceSource -Name "ParameterBinding" -Option ExecutionFlow -PSHost -Listener
5050
This command starts tracing for the ParameterBinding component of PowerShell. It uses the **Name**
5151
parameter to specify the trace source, the **Option** parameter to select the `ExecutionFlow` trace
5252
events, and the **PSHost** parameter to select the PowerShell host listener, which sends the output
53-
to the console. The **ListenerOption** parameter adds the `ProcessID` and `TimeStamp` values to the
53+
to the console. The **ListenerOption** parameter adds the `ProcessId` and `TimeStamp` values to the
5454
trace message prefix.
5555

5656
### Example 2: Stop a trace

reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This example creates a global, read-only variable that contains all processes on
5050
then it displays all properties of the variable.
5151

5252
```powershell
53-
Set-Variable -Name "processes" -Value (Get-Process) -Option constant -Scope global -Description "All processes" -PassThru |
53+
Set-Variable -Name "processes" -Value (Get-Process) -Option Constant -Scope Global -Description "All processes" -PassThru |
5454
Format-List -Property *
5555
```
5656

0 commit comments

Comments
 (0)