Skip to content

Commit 28a1692

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

40 files changed

+265
-265
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ OutputBufferingMode : Block
9898
AutoRestart : false
9999
MaxShells : 300
100100
MaxMemoryPerShellMB : 1024
101-
MaxIdleTimeoutms : 43200000
101+
MaxIdleTimeoutMs : 43200000
102102
SDKVersion : 1
103103
Name : Full
104104
XmlRenderingType : text
@@ -129,7 +129,7 @@ the content of the Plugin node. This is another way to look at the session confi
129129
computer.
130130

131131
```powershell
132-
dir wsman:\localhost\plugin
132+
dir WSMan:\localhost\plugin
133133
```
134134

135135
```Output
@@ -206,7 +206,7 @@ Name PSVersion StartupScript Permission
206206
---- --------- ------------- ---------- --------------
207207
microsoft.powershell 5.1 BUILTIN\Administrators AccessAll... server02.corp.fabrikam.com
208208
microsoft.powershell32 5.1 BUILTIN\Administrators AccessAll... server02.corp.fabrikam.com
209-
MyX86Shell 5.1 c:\test\x86Shell.ps1 BUILTIN\Administrators AccessAll... server02.corp.fabrikam.com
209+
MyX86Shell 5.1 C:\test\x86Shell.ps1 BUILTIN\Administrators AccessAll... server02.corp.fabrikam.com
210210
```
211211

212212
The `Enable-WSManCredSSP` cmdlet enables **CredSSP** delegation on Server01, the local computer. The
@@ -225,7 +225,7 @@ This example is useful for setting the value of the `$PSSessionConfigurationName
225225
variable, which takes a resource URI.
226226

227227
```
228-
(Get-PSSessionConfiguration -Name CustomShell).resourceURI
228+
(Get-PSSessionConfiguration -Name CustomShell).ResourceUri
229229
```
230230

231231
```Output

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
8888
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell
8989
3.0, installed modules are automatically imported to the session when you use any commands or
9090
providers in the module. However, you can still use the `Import-Module` command to import a module.
91-
You can disable automatic module importing using the `$PSModuleAutoloadingPreference` preference
92-
variable. For more information about the `$PSModuleAutoloadingPreference` variable, see
91+
You can disable automatic module importing using the `$PSModuleAutoLoadingPreference` preference
92+
variable. For more information about the `$PSModuleAutoLoadingPreference` variable, see
9393
[about_Preference_Variables](About/about_Preference_Variables.md).
9494

9595
A module is a package that contains members that can be used in PowerShell. Members include
@@ -116,7 +116,7 @@ Starting in Windows PowerShell 3.0, you can use `Import-Module` to import Common
116116
you use cmdlets that are implemented in non-managed code assemblies, such as those written in C++.
117117

118118
For remote computers that don't have PowerShell remoting enabled, including computers that aren't
119-
running the Windows operating system, you can use the **CIMSession** parameter of `Import-Module`
119+
running the Windows operating system, you can use the **CimSession** parameter of `Import-Module`
120120
to import CIM modules from the remote computer. The imported commands run implicitly on the remote
121121
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the
122122
remote computer.
@@ -133,7 +133,7 @@ Import-Module -Name PSDiagnostics
133133

134134
### Example 2: Import all modules specified by the module path
135135

136-
This example imports all available modules in the path specified by the `$env:PSModulePath`
136+
This example imports all available modules in the path specified by the `$Env:PSModulePath`
137137
environment variable into the current session.
138138

139139
```powershell
@@ -162,7 +162,7 @@ session.
162162
This example uses an explicit path to identify the module to import.
163163

164164
```powershell
165-
Import-Module -Name c:\ps-test\modules\test -Verbose
165+
Import-Module -Name C:\ps-test\modules\test -Verbose
166166
```
167167

168168
```Output
@@ -434,7 +434,7 @@ PS> Get-Module -ListAvailable PowerShellGet | Select-Object Path
434434
Path
435435
----
436436
C:\Program Files\PowerShell\Modules\PowerShellGet\2.2.1\PowerShellGet.psd1
437-
C:\program files\powershell\6\Modules\PowerShellGet\PowerShellGet.psd1
437+
C:\Program Files\PowerShell\6\Modules\PowerShellGet\PowerShellGet.psd1
438438
C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.2\PowerShellGet.psd1
439439
C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PowerShellGet.psd1
440440
@@ -931,7 +931,7 @@ the module, such as a `.psd1`, `.psm1`, `.dll`, or `.ps1` file. File paths are o
931931
characters aren't permitted. You can also pipe module names and filenames to `Import-Module`.
932932

933933
If you omit a path, `Import-Module` looks for the module in the paths saved in the
934-
`$env:PSModulePath` environment variable.
934+
`$Env:PSModulePath` environment variable.
935935

936936
Specify only the module name whenever possible. When you specify a filename, only the members that
937937
are implemented in that file are imported. If the module contains other files, they aren't
@@ -1187,7 +1187,7 @@ Windows PowerShell includes the following aliases for `Import-Module`:
11871187
in the `PSModulePath` environmental variable. For more information, see
11881188
[about_Modules](About/about_Modules.md).
11891189

1190-
You can also use the **PSSession** and **CIMSession** parameters to import modules that are
1190+
You can also use the **PSSession** and **CimSession** parameters to import modules that are
11911191
installed on remote computers. However, commands that use the cmdlets in these modules run in the
11921192
remote session on the remote computer.
11931193

@@ -1228,7 +1228,7 @@ Windows PowerShell includes the following aliases for `Import-Module`:
12281228
To import a module that contains mixed-mode assemblies, start Windows PowerShell 2.0 by using the
12291229
following command, and then try the `Import-Module` command again.
12301230

1231-
`PowerShell.exe -Version 2.0`
1231+
`powershell.exe -Version 2.0`
12321232

12331233
- To use the CIM session feature, the remote computer must have WS-Management remoting and Windows
12341234
Management Instrumentation (WMI), which is the Microsoft implementation of the Common Information

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Some code samples use splatting to reduce the line length. For more information,
157157
This example runs the `Test.ps1` script on the Server01 computer.
158158

159159
```powershell
160-
Invoke-Command -FilePath c:\scripts\test.ps1 -ComputerName Server01
160+
Invoke-Command -FilePath C:\scripts\test.ps1 -ComputerName Server01
161161
```
162162

163163
The **FilePath** parameter specifies a script that is located on the local computer. The script runs
@@ -207,10 +207,10 @@ This example compares the effects of using **ComputerName** and **Session** para
207207
data.
208208

209209
```powershell
210-
Invoke-Command -ComputerName Server02 -ScriptBlock { $p = Get-Process PowerShell }
210+
Invoke-Command -ComputerName Server02 -ScriptBlock { $p = Get-Process powershell }
211211
Invoke-Command -ComputerName Server02 -ScriptBlock { $p.VirtualMemorySize }
212212
$s = New-PSSession -ComputerName Server02
213-
Invoke-Command -Session $s -ScriptBlock { $p = Get-Process PowerShell }
213+
Invoke-Command -Session $s -ScriptBlock { $p = Get-Process powershell }
214214
Invoke-Command -Session $s -ScriptBlock { $p.VirtualMemorySize }
215215
```
216216

@@ -300,13 +300,13 @@ but the job exists on the local computer. The results are transmitted to the loc
300300

301301
```powershell
302302
$s = New-PSSession -ComputerName Server01, Server02
303-
Invoke-Command -Session $s -ScriptBlock { Get-EventLog system } -AsJob
303+
Invoke-Command -Session $s -ScriptBlock { Get-EventLog System } -AsJob
304304
```
305305

306306
```Output
307307
Id Name State HasMoreData Location Command
308308
--- ---- ----- ----- ----------- ---------------
309-
1 Job1 Running True Server01,Server02 Get-EventLog system
309+
1 Job1 Running True Server01,Server02 Get-EventLog System
310310
```
311311

312312
```powershell
@@ -318,7 +318,7 @@ $j | Format-List -Property *
318318
HasMoreData : True
319319
StatusMessage :
320320
Location : Server01,Server02
321-
Command : Get-EventLog system
321+
Command : Get-EventLog System
322322
JobStateInfo : Running
323323
Finished : System.Threading.ManualResetEvent
324324
InstanceId : e124bb59-8cb2-498b-a0d2-2e07d4e030ca
@@ -351,9 +351,9 @@ the results in the `$results` variable.
351351
### Example 9: Include local variables in a command run on a remote computer
352352

353353
This example shows how to include the values of local variables in a command run on a remote
354-
computer. The command uses the `Using` scope modifier to identify a local variable in a remote
355-
command. By default, all variables are assumed to be defined in the remote session. The `Using`
356-
scope modifier was introduced in PowerShell 3.0. For more information about the `Using` scope
354+
computer. The command uses the `Using:` scope modifier to identify a local variable in a remote
355+
command. By default, all variables are assumed to be defined in the remote session. The `Using:`
356+
scope modifier was introduced in PowerShell 3.0. For more information about the `Using:` scope
357357
modifier, see [about_Remote_Variables](./About/about_Remote_Variables.md) and
358358
[about_Scopes](./about/about_scopes.md).
359359

@@ -366,8 +366,8 @@ Invoke-Command -ComputerName Server01 -ScriptBlock {
366366

367367
The `$Log` variable stores the name of the event log, Windows PowerShell. The `Invoke-Command`
368368
cmdlet runs `Get-EventLog` on Server01 to get the ten newest events from the event log. The value of
369-
the **LogName** parameter is the `$Log` variable, which is prefixed by the `Using` scope modifier to
370-
indicate that it was created in the local session, not in the remote session.
369+
the **LogName** parameter is the `$Log` variable, which is prefixed by the `Using:` scope modifier
370+
to indicate that it was created in the local session, not in the remote session.
371371

372372
### Example 10: Hide the computer name
373373

@@ -377,7 +377,7 @@ display. You can still use the **Format** cmdlets to display the **PsComputerNam
377377
of the affected objects.
378378

379379
```powershell
380-
Invoke-Command -ComputerName S1, S2 -ScriptBlock { Get-Process PowerShell }
380+
Invoke-Command -ComputerName S1, S2 -ScriptBlock { Get-Process powershell }
381381
```
382382

383383
```Output
@@ -389,7 +389,7 @@ S2 777 14 35100 30988 150 3.68 67 Po
389389

390390
```powershell
391391
Invoke-Command -ComputerName S1, S2 -HideComputerName -ScriptBlock {
392-
Get-Process PowerShell
392+
Get-Process powershell
393393
}
394394
```
395395

@@ -405,21 +405,21 @@ process. The output of the first command includes the **PsComputerName** propert
405405
the name of the computer on which the command ran. The output of the second command, which uses
406406
**HideComputerName**, doesn't include the **PsComputerName** column.
407407

408-
### Example 11: Use the Param keyword in a script block
408+
### Example 11: Use the `param` keyword in a script block
409409

410-
The `Param` keyword and the **ArgumentList** parameter are used to pass variable values to named
410+
The `param` keyword and the **ArgumentList** parameter are used to pass variable values to named
411411
parameters in a script block. This example displays filenames that begin with the letter `a` and
412412
have the `.pdf` extension.
413413

414-
For more information about the `Param` keyword, see
414+
For more information about the `param` keyword, see
415415
[about_Language_Keywords](./about/about_language_keywords.md#param).
416416

417417
```powershell
418418
$parameters = @{
419419
ComputerName = 'Server01'
420420
ScriptBlock = {
421-
Param ($param1, $param2)
422-
Get-ChildItem -Name $param1 -Include $param2
421+
param ($Param1, $Param2)
422+
Get-ChildItem -Name $Param1 -Include $Param2
423423
}
424424
ArgumentList = 'a*', '*.pdf'
425425
}
@@ -433,8 +433,8 @@ ac.pdf
433433
az.pdf
434434
```
435435

436-
`Invoke-Command` uses the **ScriptBlock** parameter that defines two variables, `$param1` and
437-
`$param2`. `Get-ChildItem` uses the named parameters, **Name** and **Include** with the variable
436+
`Invoke-Command` uses the **ScriptBlock** parameter that defines two variables, `$Param1` and
437+
`$Param2`. `Get-ChildItem` uses the named parameters, **Name** and **Include** with the variable
438438
names. The **ArgumentList** passes the values to the variables.
439439

440440
### Example 12: Use the $args automatic variable in a script block
@@ -1415,7 +1415,7 @@ on a single computer.
14151415

14161416
If the remote computer isn't in a domain that the local computer trusts, the computer might not be
14171417
able to authenticate the user's credentials. To add the remote computer to the list of trusted hosts
1418-
in WS-Management, use the following command in the `WSMAN` provider, where `<Remote-Computer-Name>`
1418+
in WS-Management, use the following command in the `WSMan` provider, where `<Remote-Computer-Name>`
14191419
is the name of the remote computer:
14201420

14211421
`Set-Item -Path WSMan:\Localhost\Client\TrustedHosts -Value \<Remote-Computer-Name\>`

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ This example demonstrates that dynamic modules are not returned by the `Get-Modu
8484
members that they export are returned by the `Get-Command` cmdlet.
8585

8686
```powershell
87-
new-module -scriptblock {function Hello {"Hello!"}}
87+
New-Module -ScriptBlock {function Hello {"Hello!"}}
8888
```
8989

9090
```Output
@@ -122,7 +122,7 @@ This example uses the `Export-ModuleMember` cmdlet to export a variable into the
122122
Without the `Export-ModuleMember` command, only the function is exported.
123123

124124
```powershell
125-
New-Module -ScriptBlock {$SayHelloHelp="Type 'SayHello', a space, and a name."; function SayHello ($name) { "Hello, $name" }; Export-ModuleMember -function SayHello -Variable SayHelloHelp}
125+
New-Module -ScriptBlock {$SayHelloHelp="Type 'SayHello', a space, and a name."; function SayHello ($Name) { "Hello, $Name" }; Export-ModuleMember -Function SayHello -Variable SayHelloHelp}
126126
$SayHelloHelp
127127
```
128128

@@ -151,7 +151,7 @@ return any objects by default, there is no output from this command. `Get-Module
151151
**GreetingModule** has been imported into the current session.
152152

153153
```powershell
154-
New-Module -ScriptBlock {function Hello {"Hello!"}} -name GreetingModule | Import-Module
154+
New-Module -ScriptBlock {function Hello {"Hello!"}} -Name GreetingModule | Import-Module
155155
Get-Module
156156
```
157157

@@ -173,7 +173,7 @@ NestedModules : {}
173173
```
174174

175175
```powershell
176-
Get-Command hello
176+
Get-Command Hello
177177
```
178178

179179
```Output
@@ -196,8 +196,8 @@ The `$m` variable appears to have no assigned value.
196196

197197
```powershell
198198
$m = New-Module -ScriptBlock {
199-
function Hello ($name) {"Hello, $name"}
200-
function Goodbye ($name) {"Goodbye, $name"}
199+
function Hello ($Name) {"Hello, $Name"}
200+
function Goodbye ($Name) {"Goodbye, $Name"}
201201
} -AsCustomObject
202202
$m
203203
$m | Get-Member
@@ -217,15 +217,15 @@ Hello ScriptMethod System.Object Hello();
217217
```
218218

219219
```powershell
220-
$m.goodbye("Jane")
220+
$m.Goodbye("Jane")
221221
```
222222

223223
```Output
224224
Goodbye, Jane
225225
```
226226

227227
```powershell
228-
$m.hello("Manoj")
228+
$m.Hello("Manoj")
229229
```
230230

231231
```Output

reference/5.1/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
2929
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that
3030
can be exposed through session configuration files. This includes determining which cmdlets,
3131
functions, and scripts are available to users. The capability file is a human-readable text file
32-
that contains a hash table of session configuration properties and values. The file has a .psrc file
33-
name extension, and can be used by more than one session configuration.
32+
that contains a hash table of session configuration properties and values. The file has a `.psrc`
33+
file name extension, and can be used by more than one session configuration.
3434

3535
All the parameters of `New-PSRoleCapabilityFile` are optional except for the **Path** parameter,
3636
which specifies the path for the file. If you don't include a parameter when you run the cmdlet, the
@@ -235,7 +235,7 @@ the following keys:
235235

236236
For example:
237237

238-
`@{Name="Get-PowerShellProcess";ScriptBlock={Get-Process PowerShell};Options="AllScope"}`
238+
`@{Name="Get-PowerShellProcess";ScriptBlock={Get-Process powershell};Options="AllScope"}`
239239

240240
```yaml
241241
Type: System.Collections.IDictionary[]

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ the `$s` variable. It uses the credentials of the `Domain1\Admin01` user to comp
148148
### Example 6: Create a session with a global scope in a different domain
149149

150150
```powershell
151-
$global:s = New-PSSession -ComputerName Server1.Domain44.Corpnet.Fabrikam.com -Credential Domain01\Admin01
151+
$Global:s = New-PSSession -ComputerName Server1.Domain44.Corpnet.Fabrikam.com -Credential Domain01\Admin01
152152
```
153153

154154
This example shows how to create a **PSSession** with a global scope on a computer in a different
@@ -181,7 +181,7 @@ text file, or other text-convertible format.
181181
### Example 8: Create a session by using a URI
182182

183183
```powershell
184-
$s = New-PSSession -URI http://Server01:91/NewSession -Credential Domain01\User01
184+
$s = New-PSSession -Uri http://Server01:91/NewSession -Credential Domain01\User01
185185
```
186186

187187
This command creates a **PSSession** on the Server01 computer and stores it in the `$s` variable. It
@@ -193,7 +193,7 @@ that has permission to create a session on the remote computer.
193193

194194
```powershell
195195
$s = New-PSSession -ComputerName (Get-Content Servers.txt) -Credential Domain01\Admin01 -ThrottleLimit 16
196-
Invoke-Command -Session $s -ScriptBlock {Get-Process PowerShell} -AsJob
196+
Invoke-Command -Session $s -ScriptBlock {Get-Process powershell} -AsJob
197197
```
198198

199199
These commands create a set of **PSSession** objects and then run a background job in each of the
@@ -210,7 +210,7 @@ command to `16` concurrent connections. The command saves the **PSSession** obje
210210
variable.
211211

212212
The second command uses the **AsJob** parameter of the `Invoke-Command` cmdlet to start a background
213-
job that runs a `Get-Process PowerShell` command in each of the **PSSession** objects in `$s`.
213+
job that runs a `Get-Process powershell` command in each of the **PSSession** objects in `$s`.
214214

215215
For more information about PowerShell background jobs, see
216216
[about_Jobs](About/about_Jobs.md) and [about_Remote_Jobs](About/about_Remote_Jobs.md).

0 commit comments

Comments
 (0)