Skip to content

Commit 9230135

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 9230135

40 files changed

+186
-186
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ PS> $parms = @{
256256
ConfigurationName = "ITTasks"
257257
}
258258
PS> Invoke-Command @parms
259-
PS> Exit
259+
PS> exit
260260
261261
262262
PS> $s = Get-PSSession -ComputerName Server01, Server02, Server30 -Name BugStatus
@@ -318,7 +318,7 @@ This example shows what happens to a job that's running in a disconnected sessio
318318

319319
```
320320
PS> $s = New-PSSession -ComputerName Server01 -Name Test
321-
PS> $j = Invoke-Command -Session $s { 1..1500 | Foreach-Object {"Return $_"; sleep 30}} -AsJob
321+
PS> $j = Invoke-Command -Session $s { 1..1500 | ForEach-Object {"Return $_"; sleep 30}} -AsJob
322322
PS> $j
323323
324324
Id Name State HasMoreData Location
@@ -501,7 +501,7 @@ computer.
501501

502502
Type the NetBIOS name, an IP address, or a fully qualified domain name (FQDN) of one computer.
503503
Wildcard characters aren't permitted. To specify the local computer, type the computer name, a dot
504-
(`.`), `$env:COMPUTERNAME`, or localhost.
504+
(`.`), `$Env:COMPUTERNAME`, or localhost.
505505

506506
```yaml
507507
Type: System.String
@@ -633,7 +633,7 @@ Accept wildcard characters: False
633633

634634
Specifies the instance ID of the disconnected session. The instance ID is a GUID that uniquely
635635
identifies a **PSSession** on a local or remote computer. The instance ID is stored in the
636-
**InstanceID** property of the **PSSession**.
636+
**InstanceId** property of the **PSSession**.
637637

638638
```yaml
639639
Type: System.Guid

reference/5.1/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ parameter specifies the configuration class to use from the assembly.
9191
```powershell
9292
$sessionConfiguration = @{
9393
Name='NewShell'
94-
ApplicationBase='c:\MyShells\'
94+
ApplicationBase='C:\MyShells\'
9595
AssemblyName='MyShell.dll'
9696
ConfigurationTypeName='MyClass'
9797
}
9898
Register-PSSessionConfiguration @sessionConfiguration
9999
```
100100

101-
To use this configuration, type `New-PSSession -ConfigurationName newshell`.
101+
To use this configuration, type `New-PSSession -ConfigurationName NewShell`.
102102

103103
### Example 2: Register a MaintenanceShell session configuration
104104

@@ -504,8 +504,8 @@ instead of this parameter. You can't use both parameters in the same command.
504504

505505
If you omit this parameter, the root SDDL for the **WinRM** service is used for this configuration.
506506
To view or change the root SDDL, use the WSMan provider. For example
507-
`Get-Item wsman:\localhost\service\rootSDDL`. For more information about the WSMan provider, type
508-
`Get-Help wsman`.
507+
`Get-Item WSMan:\localhost\service\rootSDDL`. For more information about the WSMan provider, type
508+
`Get-Help WSMan`.
509509

510510
```yaml
511511
Type: System.String
@@ -761,7 +761,7 @@ To run this cmdlet you must start PowerShell by using the **Run as administrator
761761

762762
This cmdlet generates XML that represents a Web Services for Management (WS-Management) plug-in
763763
configuration and sends the XML to WS-Management, which registers the plug-in on the local computer
764-
(`New-Item wsman:\localhost\plugin`).
764+
(`New-Item WSMan:\localhost\plugin`).
765765

766766
The properties of a session configuration object vary with the options set for the session
767767
configuration and the values of those options. Also, session configurations that use a session

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by
6363
cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
6464

6565
You can use `Remove-Job` to delete all jobs or delete selected jobs. The jobs are identified by
66-
their **Name**, **ID**, **Instance ID**, **Command**, or **State**. Or, a job object can be sent
66+
their **Name**, **Id**, **InstanceId**, **Command**, or **State**. Or, a job object can be sent
6767
down the pipeline to `Remove-Job`. Without parameters or parameter values, `Remove-Job` has no
6868
effect.
6969

@@ -98,7 +98,7 @@ An alternative is to use the **Job** parameter, such as `Remove-Job -Job $batch`
9898
In this example, all the jobs in the current PowerShell session are deleted.
9999

100100
```powershell
101-
Get-job | Remove-Job
101+
Get-Job | Remove-Job
102102
```
103103

104104
`Get-Job` gets all the jobs in the current PowerShell session. The job objects are sent down the
@@ -172,7 +172,7 @@ the job named **MyJob** is deleted.
172172
This example removes a job based on its **InstanceId**.
173173

174174
```powershell
175-
$job = Start-Job -ScriptBlock {Get-Process PowerShell}
175+
$job = Start-Job -ScriptBlock {Get-Process powershell}
176176
$job | Format-List -Property *
177177
Remove-Job -InstanceId ad02b942-8007-4407-87f3-d23e71955872
178178
```
@@ -182,7 +182,7 @@ State : Completed
182182
HasMoreData : True
183183
StatusMessage :
184184
Location : localhost
185-
Command : Get-Process PowerShell
185+
Command : Get-Process powershell
186186
JobStateInfo : Completed
187187
Finished : System.Threading.ManualResetEvent
188188
InstanceId : ad02b942-8007-4407-87f3-d23e71955872

reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $OnRemoveScript = {
118118
$ExecutionContext.SessionState.Module.OnRemove += $OnRemoveScript
119119
120120
$registerEngineEventSplat = @{
121-
SourceIdentifier = ([System.Management.Automation.PsEngineEvent]::Exiting)
121+
SourceIdentifier = ([System.Management.Automation.PSEngineEvent]::Exiting)
122122
Action = $OnRemoveScript
123123
}
124124
Register-EngineEvent @registerEngineEventSplat
@@ -128,7 +128,7 @@ The `$OnRemoveScript` variable contains the script block that cleans up the reso
128128
the script block by assigning it to `$ExecutionContext.SessionState.Module.OnRemove`. You can also
129129
use `Register-EngineEvent` to have the script block execute when the PowerShell session ends.
130130

131-
For script-based modules, you would add this code to the `.PSM1` file or put it in a startup script
131+
For script-based modules, you would add this code to the `.psm1` file or put it in a startup script
132132
that is listed in the **ScriptsToProcess** property of the module manifest.
133133

134134
## PARAMETERS

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ stops any commands that are running in the **PSSessions**, ends the **PSSession*
6969
resources that the **PSSession** was using. If the **PSSession** is connected to a remote computer,
7070
this cmdlet also closes the connection between the local and remote computers.
7171

72-
To remove a **PSSession**, enter the **Name**, **ComputerName**, **ID**, or **InstanceID** of the
72+
To remove a **PSSession**, enter the **Name**, **ComputerName**, **Id**, or **InstanceId** of the
7373
session.
7474

7575
If you have saved the **PSSession** in a variable, the session object remains in the variable, but
@@ -110,17 +110,17 @@ with `Serv`.
110110
### Example 4: Close sessions connected to a port
111111

112112
```powershell
113-
Get-PSSession | where {$_.port -eq 90} | Remove-PSSession
113+
Get-PSSession | where {$_.Port -eq 90} | Remove-PSSession
114114
```
115115

116116
This command closes the **PSSessions** that are connected to port 90. You can use this command
117-
format to identify **PSSessions** by properties other than **ComputerName**, **Name**, **InstanceID**, and
118-
**ID**.
117+
format to identify **PSSessions** by properties other than **ComputerName**, **Name**, **InstanceId**, and
118+
**Id**.
119119

120120
### Example 5: Close a session by instance ID
121121

122122
```powershell
123-
Get-PSSession | Format-Table ComputerName, InstanceID -AutoSize
123+
Get-PSSession | Format-Table ComputerName, InstanceId -AutoSize
124124
```
125125

126126
```Output
@@ -134,26 +134,26 @@ TX-TEST-01 fc4e9dfa-f246-452d-9fa3-1adbdd64ae85
134134
```
135135

136136
```powershell
137-
Remove-PSSession -InstanceID fc4e9dfa-f246-452d-9fa3-1adbdd64ae85
137+
Remove-PSSession -InstanceId fc4e9dfa-f246-452d-9fa3-1adbdd64ae85
138138
```
139139

140140
These commands show how to close a **PSSession** based on its instance ID, or **RemoteRunspaceID**.
141141

142142
The first command uses the `Get-PSSession` cmdlet to get the **PSSessions** in the current session.
143143
It uses a pipeline operator (`|`) to send the **PSSessions** to the `Format-Table` cmdlet, which
144-
formats their **ComputerName** and **InstanceID** properties in a table. The **AutoSize** parameter
144+
formats their **ComputerName** and **InstanceId** properties in a table. The **AutoSize** parameter
145145
compresses the columns for display.
146146

147147
From the resulting display, you can identify the **PSSession** to be closed, and copy and paste the
148-
**InstanceID** of that **PSSession** into the second command.
148+
**InstanceId** of that **PSSession** into the second command.
149149

150150
The second command uses the `Remove-PSSession` cmdlet to remove the **PSSession** with the specified
151151
instance ID.
152152

153153
### Example 6: Create a function that deletes all sessions in the current session
154154

155155
```powershell
156-
Function EndPSS { Get-PSSession | Remove-PSSession }
156+
function EndPSS { Get-PSSession | Remove-PSSession }
157157
```
158158

159159
This function closes every **PSSession** in the current session. After you add this function to your
@@ -229,8 +229,8 @@ instance IDs.
229229
The instance ID is a GUID that uniquely identifies a **PSSession** in the current session. The
230230
instance ID is unique, even when you have multiple sessions running on a single computer.
231231

232-
The instance ID is stored in the **InstanceID** property of the object that represents a
233-
**PSSession**. To find the **InstanceID** of the **PSSessions** in the current session, type
232+
The instance ID is stored in the **InstanceId** property of the object that represents a
233+
**PSSession**. To find the **InstanceId** of the **PSSessions** in the current session, type
234234
`Get-PSSession | Format-Table Name, ComputerName, InstanceId`.
235235

236236
```yaml

reference/5.1/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ParamName ParamValue
125125
psmaximumreceivedobjectsizemb 20
126126
127127
"Restart WinRM service"
128-
WinRM service need to be restarted to make the changes effective. Do you want to run the command "restart-service winrm"?
128+
WinRM service need to be restarted to make the changes effective. Do you want to run the command "Restart-Service winrm"?
129129
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
130130
```
131131

@@ -140,7 +140,7 @@ operator (`|`) sends the results of the command to `Format-List`, which displays
140140
of the configuration object in a list. Next, using the WSMan provider, we view the initialization
141141
parameters for the **MaintenanceShell** configuration. `Get-ChildItem` gets the child items in the
142142
**InitializationParameters** node for the **MaintenanceShell** plug-in. For more information about
143-
the WSMan provider, type `Get-Help wsman`.
143+
the WSMan provider, type `Get-Help WSMan`.
144144

145145
```powershell
146146
Set-PSSessionConfiguration -Name "MaintenanceShell" -StartupScript "C:\ps-test\Maintenance.ps1"
@@ -151,11 +151,11 @@ WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Plugin\MaintenanceShell
151151
152152
ParamName ParamValue
153153
--------- ----------
154-
startupscript c:\ps-test\Mainte...
154+
startupscript C:\ps-test\Mainte...
155155
156156
"Restart WinRM service"
157157
WinRM service need to be restarted to make the changes effective. Do you want to run
158-
the command "restart-service winrm"?
158+
the command "Restart-Service winrm"?
159159
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
160160
161161
```
@@ -172,7 +172,7 @@ SDKVersion : 1
172172
XmlRenderingType : text
173173
lang : en-US
174174
PSVersion : 2.0
175-
startupscript : c:\ps-test\Maintenance.ps1
175+
startupscript : C:\ps-test\Maintenance.ps1
176176
ResourceUri : http://schemas.microsoft.com/powershell/MaintenanceShell
177177
SupportsOptions : true
178178
ExactMatch : true
@@ -188,7 +188,7 @@ Get-ChildItem WSMan:\localhost\Plugin\MaintenanceShell\InitializationParameters
188188
ParamName ParamValue
189189
--------- ----------
190190
PSVersion 2.0
191-
startupscript c:\ps-test\Maintenance.ps1
191+
startupscript C:\ps-test\Maintenance.ps1
192192
```
193193

194194
## PARAMETERS

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ computer.
168168
This example uses a background job to get a specified process by name.
169169

170170
```powershell
171-
Start-Job -Name PShellJob -ScriptBlock { Get-Process -Name PowerShell }
171+
Start-Job -Name PShellJob -ScriptBlock { Get-Process -Name powershell }
172172
```
173173

174174
`Start-Job` uses the **Name** parameter to specify a friendly job name, **PShellJob**. The
175-
**ScriptBlock** parameter specifies `Get-Process` to get processes with the name **PowerShell**.
175+
**ScriptBlock** parameter specifies `Get-Process` to get processes with the name `powershell`.
176176

177177
### Example 6: Collect and save data by using a background job
178178

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ feature.
7777
```powershell
7878
$s = New-PSSession -ComputerName Server01 -Credential Domain01\Admin02
7979
$j = Invoke-Command -Session $s -ScriptBlock {Start-Job -ScriptBlock {Get-EventLog -LogName System}}
80-
Invoke-Command -Session $s -ScriptBlock { Stop-job -Job $Using:j }
80+
Invoke-Command -Session $s -ScriptBlock { Stop-Job -Job $Using:j }
8181
```
8282

8383
This example shows how to use the `Stop-Job` cmdlet to stop a job that is running on a remote
@@ -98,8 +98,8 @@ stored in the `$j` variable.
9898

9999
The third command stops the job. It uses the `Invoke-Command` cmdlet to run a `Stop-Job` command in
100100
the **PSSession** on Server01. Because the job objects are stored in `$j`, which is a variable on
101-
the local computer, the command uses the **Using** scope modifier to identify `$j` as a local
102-
variable. For more information about the **Using** scope modifier, see
101+
the local computer, the command uses the `Using:` scope modifier to identify `$j` as a local
102+
variable. For more information about the `Using:` scope modifier, see
103103
[about_Remote_Variables](about/about_Remote_Variables.md).
104104

105105
When the command finishes, the job is stopped and the **PSSession** in `$s` is available for use.
@@ -140,29 +140,29 @@ This command stops all the jobs that are blocked.
140140

141141
```powershell
142142
Get-Job | Format-Table ID, Name, Command, @{Label="State";Expression={$_.JobStateInfo.State}},
143-
InstanceID -Auto
143+
InstanceId -Auto
144144
```
145145

146146
```Output
147147
Id Name Command State InstanceId
148148
-- ---- ------- ----- ----------
149-
1 Job1 start-service schedule Running 05abb67a-2932-4bd5-b331-c0254b8d9146
150-
3 Job3 start-service schedule Running c03cbd45-19f3-4558-ba94-ebe41b68ad03
151-
5 Job5 get-service s* Blocked e3bbfed1-9c53-401a-a2c3-a8db34336adf
149+
1 Job1 Start-Service schedule Running 05abb67a-2932-4bd5-b331-c0254b8d9146
150+
3 Job3 Start-Service schedule Running c03cbd45-19f3-4558-ba94-ebe41b68ad03
151+
5 Job5 Get-Service s* Blocked e3bbfed1-9c53-401a-a2c3-a8db34336adf
152152
```
153153

154154
```powershell
155155
Stop-Job -InstanceId e3bbfed1-9c53-401a-a2c3-a8db34336adf
156156
```
157157

158-
These commands show how to stop a job based on its **InstanceID**.
158+
These commands show how to stop a job based on its **InstanceId**.
159159

160160
The first command uses the `Get-Job` cmdlet to get the jobs in the current session. The command uses
161161
a pipeline operator (`|`) to send the jobs to a `Format-Table` command, which displays a table of
162-
the specified properties of each job. The table includes the **InstanceID** of each job. It uses a
162+
the specified properties of each job. The table includes the **InstanceId** of each job. It uses a
163163
calculated property to display the job state.
164164

165-
The second command uses a `Stop-Job` command that has the **InstanceID** parameter to stop a
165+
The second command uses a `Stop-Job` command that has the **InstanceId** parameter to stop a
166166
selected job.
167167

168168
### Example 7: Stop a job on a remote computer

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ This example shows how to get tab completion for parameter values. In this examp
8686
this technique to test that tab completion for your function returns the expected results.
8787

8888
```powershell
89-
function GetData {
89+
function Get-Data {
9090
param (
9191
[ValidateSet('One', 'Two', 'Three')]
9292
[string]$Stage
9393
)
9494
Write-Verbose "Retrieving data for stage $Stage"
9595
}
9696
97-
$result = TabExpansion2 -inputScript ($line = 'GetData -Stage ') -cursorColumn $line.Length |
97+
$result = TabExpansion2 -inputScript ($line = 'Get-Data -Stage ') -cursorColumn $line.Length |
9898
Select-Object -ExpandProperty CompletionMatches
9999
$result.Count -eq 3
100100
$result.CompletionText -contains 'Three'

reference/5.1/Microsoft.PowerShell.Core/Test-ModuleManifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ This command tests the `TestModule.psd1` module manifest.
4444
### Example 2: Test a manifest by using the pipeline
4545

4646
```powershell
47-
"$PSHOME\Modules\TestModule.psd1" | test-modulemanifest
47+
"$PSHOME\Modules\TestModule.psd1" | Test-ModuleManifest
4848
```
4949

5050
```Output
5151
Test-ModuleManifest : The specified type data file 'C:\Windows\System32\Wi
5252
ndowsPowerShell\v1.0\Modules\TestModule\TestTypes.ps1xml' could not be processed because the file was not found. Please correct the path and try again.
5353
At line:1 char:34
54-
+ "$PSHOME\Modules\TestModule.psd1" | test-modulemanifest <<<<
54+
+ "$PSHOME\Modules\TestModule.psd1" | Test-ModuleManifest <<<<
5555
+ CategoryInfo : ResourceUnavailable: (C:\Windows\System32\WindowsPowerShell\v1.0\Modules\TestModule\TestTypes.ps1xml:String) [Test-ModuleManifest], FileNotFoundException
5656
+ FullyQualifiedErrorId : Modules_TypeDataFileNotFound,Microsoft.PowerShell.Commands.TestModuleManifestCommandName
5757

0 commit comments

Comments
 (0)