Skip to content

Commit 39aa8c6

Browse files
Fix incorrect case/capitalization in ref docs (#11937)
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 08792df commit 39aa8c6

39 files changed

+135
-135
lines changed

reference/7.4/Microsoft.PowerShell.Core/About/about_Thread_Jobs.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ two cases for that meet this criteria.
160160

161161
```powershell
162162
(Measure-Command {
163-
1..1000 | ForEach { Start-ThreadJob { Write-Output "Hello $using:_" } } | Receive-Job -Wait
163+
1..1000 | foreach { Start-ThreadJob { Write-Output "Hello $Using:_" } } | Receive-Job -Wait
164164
}).TotalMilliseconds
165165
36860.8226
166166
@@ -170,13 +170,13 @@ two cases for that meet this criteria.
170170
7.1975
171171
```
172172

173-
The first example above shows a foreach loop that creates 1000 thread jobs to
173+
The first example above shows a `foreach` loop that creates 1000 thread jobs to
174174
do a simple string write. Due to job overhead, it takes over 36 seconds to
175175
complete.
176176

177-
The second example runs the `ForEach` cmdlet to do the same 1000 operations.
178-
This time, `ForEach-Object` runs sequentially, on a single thread, without any
179-
job overhead. It completes in a mere 7 milliseconds.
177+
The second example runs the `ForEach-Object` cmdlet to do the same 1000
178+
operations. This time, `ForEach-Object` runs sequentially, on a single thread,
179+
without any job overhead. It completes in a mere 7 milliseconds.
180180

181181
In the following example, up to 5000 entries are collected for 10 separate
182182
system logs. Since the script involves reading a number of logs, it makes sense
@@ -201,9 +201,9 @@ The script completes in half the time when the jobs are run in parallel.
201201

202202
```powershell
203203
Measure-Command {
204-
$logs = $logNames | ForEach {
204+
$logs = $logNames | foreach {
205205
Start-ThreadJob {
206-
Get-WinEvent -LogName $using:_ -MaxEvents 5000 2>$null
206+
Get-WinEvent -LogName $Using:_ -MaxEvents 5000 2>$null
207207
} -ThrottleLimit 10
208208
} | Wait-Job | Receive-Job
209209
}
@@ -218,29 +218,29 @@ $logs.Count
218218
There are multiple ways to pass values into the thread-based jobs.
219219

220220
`Start-ThreadJob` can accept variables that are piped to the cmdlet, passed in
221-
to the script block via the `$using` keyword, or passed in via the
221+
to the script block via the `Using:` scope modifier, or passed in via the
222222
**ArgumentList** parameter.
223223

224224
```powershell
225225
$msg = "Hello"
226226
227227
$msg | Start-ThreadJob { $input | Write-Output } | Wait-Job | Receive-Job
228228
229-
Start-ThreadJob { Write-Output $using:msg } | Wait-Job | Receive-Job
229+
Start-ThreadJob { Write-Output $Using:msg } | Wait-Job | Receive-Job
230230
231-
Start-ThreadJob { param ([string] $message) Write-Output $message } -ArgumentList @($msg) |
231+
Start-ThreadJob { param ([string] $Message) Write-Output $Message } -ArgumentList @($msg) |
232232
Wait-Job | Receive-Job
233233
```
234234

235235
`ForEach-Object -Parallel` accepts piped in variables, and variables passed
236-
directly to the script block via the `$using` keyword.
236+
directly to the script block via the `Using:` scope modifier.
237237

238238
```powershell
239239
$msg = "Hello"
240240
241241
$msg | ForEach-Object -Parallel { Write-Output $_ } -AsJob | Wait-Job | Receive-Job
242242
243-
1..1 | ForEach-Object -Parallel { Write-Output $using:msg } -AsJob | Wait-Job | Receive-Job
243+
1..1 | ForEach-Object -Parallel { Write-Output $Using:msg } -AsJob | Wait-Job | Receive-Job
244244
```
245245

246246
Since thread jobs run in the same process, any variable reference type passed
@@ -255,10 +255,10 @@ the process.
255255

256256
```powershell
257257
$threadSafeDictionary = [System.Collections.Concurrent.ConcurrentDictionary[string,object]]::new()
258-
$jobs = Get-Process | ForEach {
258+
$jobs = Get-Process | foreach {
259259
Start-ThreadJob {
260-
$proc = $using:_
261-
$dict = $using:threadSafeDictionary
260+
$proc = $Using:_
261+
$dict = $Using:threadSafeDictionary
262262
$dict.TryAdd($proc.ProcessName, $proc)
263263
}
264264
}

reference/7.4/Microsoft.PowerShell.Core/About/about_Windows_PowerShell_Compatibility.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ remoting and reflected into current PowerShell session. This is the same
3333
transport method used for PowerShell jobs.
3434

3535
When a module is imported into the `WinPSCompatSession` session, implicit
36-
remoting generates a proxy module in the user's `$env:Temp` directory and
36+
remoting generates a proxy module in the user's `$Env:TEMP` directory and
3737
imports this proxy module into current PowerShell session. The proxy module
3838
allows PowerShell to detect that the module was loaded using Windows PowerShell
3939
Compatibility functionality.
@@ -97,7 +97,7 @@ $ConfigJSON = ConvertTo-Json -InputObject @{
9797
"Microsoft.PowerShell:ExecutionPolicy" = "RemoteSigned"
9898
}
9999
$ConfigJSON | Out-File -Force $ConfigPath
100-
pwsh -settingsFile $ConfigPath
100+
pwsh -SettingsFile $ConfigPath
101101
```
102102

103103
For more the latest information about module compatibility, see the
@@ -148,7 +148,7 @@ The Windows PowerShell Compatibility functionality:
148148

149149
The Windows PowerShell Compatibility feature uses implicit remoting to make
150150
Windows PowerShell 5.1 modules available in PowerShell 7. Implicit remoting
151-
creates temporary files in the `$env:Temp` directory. Each proxied module is
151+
creates temporary files in the `$Env:TEMP` directory. Each proxied module is
152152
stored in a separate folder with the following naming convention:
153153

154154
- `remoteIpMoProxy_<ModuleName>_<ModuleVersion>_localhost_<SessionGuid>`.
@@ -163,6 +163,6 @@ from the session or close the session.
163163

164164
<!-- link references -->
165165
[01]: about_Modules.md
166-
[02]: about_Powershell_Config.md
166+
[02]: about_PowerShell_Config.md
167167
[03]: https://aka.ms/PSModuleCompat
168168
[04]: xref:Microsoft.PowerShell.Core.Import-Module

reference/7.4/Microsoft.PowerShell.Core/Disable-PSRemoting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ disabled.
248248

249249
```powershell
250250
Disable-PSRemoting -Force
251-
powershell.exe -command 'Get-PSSessionConfiguration'
251+
powershell.exe -Command 'Get-PSSessionConfiguration'
252252
```
253253

254254
```Output
@@ -300,8 +300,8 @@ Permission : NT AUTHORITY\NETWORK AccessDenied, NT AUTHORITY\INTERACTIVE Acce
300300
```
301301

302302
```powershell
303-
powershell.exe -command 'Disable-PSRemoting -Force'
304-
powershell.exe -command 'Get-PSSessionConfiguration'
303+
powershell.exe -Command 'Disable-PSRemoting -Force'
304+
powershell.exe -Command 'Get-PSSessionConfiguration'
305305
```
306306

307307
```Output

reference/7.4/Microsoft.PowerShell.Core/Get-PSSubsystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
139139
140140
## RELATED LINKS
141141
142-
[about_experimental_features](about/about_experimental_features.md)
142+
[about_Experimental_Features](about/about_experimental_features.md)
143143
144144
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
145145

reference/7.4/Microsoft.PowerShell.Management/Set-Clipboard.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ Set-Clipboard -Value "This is a test string" -AsOSC52
5757
### Example 4: Set the default value of the **AsOSC52** parameter
5858

5959
You can detect if you are connected to a remote session over SSH by checking the value of the
60-
`$env:SSH_CLIENT` or `$env:SSH_TTY` environment variables. If either of these variables are set,
60+
`$Env:SSH_CLIENT` or `$Env:SSH_TTY` environment variables. If either of these variables are set,
6161
then you are connected to a remote session over SSH. You can use this information to set the default
6262
value of the **AsOSC52** parameter. Add one of the following lines to your PowerShell profile
6363
script.
6464

6565
```powershell
66-
$PSDefaultParameterValues['Set-Clipboard:AsOSC52'] = $env:SSH_CLIENT
67-
$PSDefaultParameterValues['Set-Clipboard:AsOSC52'] = $env:SSH_TTY
66+
$PSDefaultParameterValues['Set-Clipboard:AsOSC52'] = $Env:SSH_CLIENT
67+
$PSDefaultParameterValues['Set-Clipboard:AsOSC52'] = $Env:SSH_TTY
6868
```
6969

7070
For more information about `$PSDefaultParameterValues`, see

reference/7.4/Microsoft.PowerShell.Management/Set-Location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ specified in the command. For information about location stacks, see the [Notes]
109109
### Example 5: Navigate location history using `+` or `-`
110110

111111
```
112-
PS C:\> Set-Location -Path $env:SystemRoot
112+
PS C:\> Set-Location -Path $Env:SystemRoot
113113
PS C:\Windows> Set-Location -Path Cert:\
114114
PS Cert:\> Set-Location -Path HKLM:\
115115
PS HKLM:\>

reference/7.4/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ This command disables all breakpoints in the current console.
9797

9898
### Example 5: Disable a breakpoint in a runspace
9999

100-
In this example, a job is started and a breakpoint is set to break when the `Set-PSBreakPoint` is
101-
run. The runspace is stored in a variable and passed to the `Get-PSBreakPoint` command with the
102-
**Runspace** parameter. The output of `Get-PSBreakPoint` is piped to `Disable-PSBreakpoint` to
100+
In this example, a job is started and a breakpoint is set to break when the `Set-PSBreakpoint` is
101+
run. The runspace is stored in a variable and passed to the `Get-PSBreakpoint` command with the
102+
**Runspace** parameter. The output of `Get-PSBreakpoint` is piped to `Disable-PSBreakpoint` to
103103
disable the breakpoint in the runspace.
104104

105105
```powershell
@@ -110,7 +110,7 @@ Start-Job -ScriptBlock {
110110
111111
$runspace = Get-Runspace -Id 1
112112
113-
Get-PSBreakPoint -Runspace $runspace | Disable-Breakpoint -Runspace $runspace
113+
Get-PSBreakpoint -Runspace $runspace | Disable-Breakpoint -Runspace $runspace
114114
```
115115

116116
## PARAMETERS

reference/7.4/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
118118
### Example 5: Enable a breakpoint in a runspace
119119

120120
In this example, a job is started with a breakpoint is set to break then disabled. The runspace is
121-
stored in a variable and passed to the `Get-PSBreakPoint` command with the **Runspace** parameter.
122-
The output of `Get-PSBreakPoint` is piped to `Enable-PSBreakpoint` to enable the breakpoint in the
121+
stored in a variable and passed to the `Get-PSBreakpoint` command with the **Runspace** parameter.
122+
The output of `Get-PSBreakpoint` is piped to `Enable-PSBreakpoint` to enable the breakpoint in the
123123
runspace.
124124

125125
```powershell
@@ -131,7 +131,7 @@ Start-Job -ScriptBlock {
131131
132132
$runspace = Get-Runspace -Id 1
133133
134-
Get-PSBreakPoint -Runspace $runspace | Enable-Breakpoint -Runspace $runspace
134+
Get-PSBreakpoint -Runspace $runspace | Enable-Breakpoint -Runspace $runspace
135135
```
136136

137137
## PARAMETERS

reference/7.4/Microsoft.PowerShell.Utility/Get-Error.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this example, `Get-Error` displays the details of the most recent error that
4747
current session.
4848

4949
```powershell
50-
Get-Childitem -path /NoRealDirectory
50+
Get-ChildItem -Path /NoRealDirectory
5151
Get-Error
5252
```
5353

@@ -86,11 +86,11 @@ InvocationInfo :
8686
ScriptLineNumber : 1
8787
OffsetInLine : 1
8888
HistoryId : 57
89-
Line : Get-Childitem -path c:\NoRealDirectory
89+
Line : Get-ChildItem -Path C:\NoRealDirectory
9090
PositionMessage : At line:1 char:1
91-
+ Get-Childitem -path c:\NoRealDirectory
91+
+ Get-ChildItem -Path C:\NoRealDirectory
9292
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93-
InvocationName : Get-Childitem
93+
InvocationName : Get-ChildItem
9494
CommandOrigin : Internal
9595
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
9696
PipelineIterationInfo :

reference/7.4/Microsoft.PowerShell.Utility/Join-String.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ $parms = @{
166166
OutputSuffix = "`n}`n"
167167
Separator = "`n"
168168
}
169-
$obj.PSObject.Properties | Join-String @parms
169+
$obj.psobject.Properties | Join-String @parms
170170
```
171171

172172
```Output

0 commit comments

Comments
 (0)