Skip to content

Commit 1e3bbd0

Browse files
Fix incorrect case/capitalization in ref docs (#11930)
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 d32e501 commit 1e3bbd0

40 files changed

+111
-111
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The tracing cmdlets were designed for PowerShell developers, but they are availa
3333
### Example 1: Get trace sources by name
3434

3535
```powershell
36-
Get-TraceSource -Name "*provider*"
36+
Get-TraceSource -Name "*Provider*"
3737
```
3838

3939
This command gets all of the trace sources that have names that include provider.

reference/5.1/Microsoft.PowerShell.Utility/Get-Unique.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ These commands find the number of unique words in a text file.
4343

4444
```powershell
4545
$A = $( foreach ($line in Get-Content C:\Test1\File1.txt) {
46-
$line.tolower().split(" ")
46+
$line.ToLower().Split(" ")
4747
}) | Sort-Object | Get-Unique
48-
$A.count
48+
$A.Count
4949
```
5050

5151
The first command gets the content of the `File.txt` file. It converts each line of text to
@@ -97,7 +97,7 @@ directs `Get-Unique` to return only one object of each type.
9797
This command gets the names of processes running on the computer with duplicates eliminated.
9898

9999
```powershell
100-
Get-Process | Sort-Object | Select-Object processname | Get-Unique -AsString
100+
Get-Process | Sort-Object | Select-Object ProcessName | Get-Unique -AsString
101101
```
102102

103103
The `Get-Process` command gets all of the processes on the computer. The pipeline operator (`|`)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Windows PowerShell includes the following aliases for `Get-Variable`:
195195
- `gv`
196196

197197
- This cmdlet does not manage environment variables. To manage environment variables, you can use
198-
the environment variable provider.
198+
the Environment provider.
199199

200200
## RELATED LINKS
201201

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This example uses the **NoElement** parameter to omit the members of the group.
4444
```powershell
4545
$files = Get-ChildItem -Path $PSHOME -Recurse
4646
$files |
47-
Group-Object -Property extension -NoElement |
47+
Group-Object -Property Extension -NoElement |
4848
Sort-Object -Property Count -Descending
4949
```
5050

@@ -180,7 +180,7 @@ values are **CmdletInfo** object. The **AsString** parameter doesn't convert the
180180
groups to strings.
181181

182182
```powershell
183-
$A = Get-Command Get-*, Set-* -CommandType cmdlet |
183+
$A = Get-Command Get-*, Set-* -CommandType Cmdlet |
184184
Group-Object -Property Verb -AsHashTable -AsString
185185
$A
186186
```

reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ delimiter, or direct `Import-Csv` to use the list separator for the current cult
4141
delimiter.
4242

4343
You can also use the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets to convert objects to CSV
44-
strings (and back). These cmdlets are the same as the `Export-CSV` and `Import-Csv` cmdlets, except
44+
strings (and back). These cmdlets are the same as the `Export-Csv` and `Import-Csv` cmdlets, except
4545
that they work with data from the pipeline instead of from files.
4646

4747
If a header row entry in a CSV file contains an empty or null value, PowerShell inserts a default

reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ file in the `C:\test\zh-CN` directory into the `$Messages` variable.
6161
### Example 2: Import localized data strings
6262

6363
This example is run at the command line not in a script. It gets localized data strings from the
64-
Test.psd1 file and displays them at the command line. Because the command isn't used in a script,
64+
`Test.psd1` file and displays them at the command line. Because the command isn't used in a script,
6565
the **FileName** parameter is required. The command uses the **UICulture** parameter to specify the
6666
en-US culture.
6767

@@ -154,12 +154,12 @@ Import-LocalizedData -BindingVariable "UserMessages"
154154
$UserMessages.Msg1...
155155
```
156156

157-
In this example, the DATA section of the TestScript.ps1 script contains a `ConvertFrom-StringData`
157+
In this example, the DATA section of the `TestScript.ps1` script contains a `ConvertFrom-StringData`
158158
command that converts the contents of the DATA section to a hashtable and stores in the value of the
159159
`$UserMessages` variable.
160160

161161
The script also includes an `Import-LocalizedData` command, which imports a hashtable of translated
162-
text strings from the TestScript.psd1 file in the subdirectory specified by the value of the
162+
text strings from the `TestScript.psd1` file in the subdirectory specified by the value of the
163163
`$PSUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from
164164
the file in the value of the same `$UserMessages` variable, overwriting the hashtable saved by the
165165
DATA section logic.
@@ -256,7 +256,7 @@ Accept wildcard characters: False
256256

257257
### -FileName
258258

259-
Specifies the name of the data file (`.psd1)` to be imported. Enter a filename. You can specify a
259+
Specifies the name of the data file (`.psd1`) to be imported. Enter a filename. You can specify a
260260
filename that doesn't include its `.psd1` filename extension, or you can specify the filename
261261
including the `.psd1` filename extension. Data files should be saved as Unicode or UTF-8.
262262

reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ need to use the `Invoke-Command` cmdlet to run an imported command.
103103
```
104104
$S1 = New-PSSession -ComputerName s1
105105
$S2 = New-PSSession -ComputerName s2
106-
Import-PSSession -Session s1 -Type cmdlet -Name New-Test, Get-Test -FormatTypeName *
106+
Import-PSSession -Session s1 -Type Cmdlet -Name New-Test, Get-Test -FormatTypeName *
107107
Import-PSSession -Session s2 -Type Cmdlet -Name Set-Test -FormatTypeName *
108108
New-Test Test1 | Set-Test -RunType Full
109109
```
@@ -199,7 +199,7 @@ function into the current session.
199199

200200
The `Import-PSSession` cmdlet returns a **PSModuleInfo** object that represents the temporary
201201
module. The value of the **Path** property shows that `Import-PSSession` created a script module
202-
(.psm1) file in a temporary location. The **ExportedFunctions** property shows that the `Get-Date`
202+
(`.psm1`) file in a temporary location. The **ExportedFunctions** property shows that the `Get-Date`
203203
cmdlet and the SearchHelp function were both imported as functions.
204204

205205
### Example 7: Run a command that is hidden by an imported command
@@ -327,7 +327,7 @@ Accept wildcard characters: False
327327
Specifies an array of commands that results from using the specified arguments (parameter values).
328328
329329
For instance, to import the variant of the `Get-Item` command in the certificate (Cert:) drive in
330-
the PSSession in `$S`, type `Import-PSSession -Session $S -Command Get-Item -ArgumentList cert:`.
330+
the PSSession in `$S`, type `Import-PSSession -Session $S -Command Get-Item -ArgumentList Cert:`.
331331

332332
```yaml
333333
Type: System.Object[]
@@ -344,7 +344,7 @@ Accept wildcard characters: False
344344
### -Certificate
345345

346346
Specifies the client certificate that is used to sign the format files (*.Format.ps1xml) or script
347-
module files (.psm1) in the temporary module that `Import-PSSession` creates.
347+
module files (`.psm1`) in the temporary module that `Import-PSSession` creates.
348348

349349
Enter a variable that contains a certificate or a command or expression that gets the certificate.
350350

@@ -398,11 +398,11 @@ alias, **Type**. The acceptable values for this parameter are:
398398
- `Alias`: The Windows PowerShell aliases in the remote session.
399399
- `All`: The cmdlets and functions in the remote session.
400400
- `Application`: All the files other than Windows-PowerShell files in the paths that are listed in
401-
the Path environment variable (`$env:path`) in the remote session, including .txt, .exe, and .dll
401+
the PATH environment variable (`$Env:PATH`) in the remote session, including .txt, .exe, and .dll
402402
files.
403403
- `Cmdlet`: The cmdlets in the remote session. "Cmdlet" is the default.
404-
- `ExternalScript`: The .ps1 files in the paths listed in the Path environment variable
405-
(`$env:path`) in the remote session.
404+
- `ExternalScript`: The `.ps1` files in the paths listed in the PATH environment variable
405+
(`$Env:PATH`) in the remote session.
406406
- `Filter` and `Function`: The Windows PowerShell functions in the remote session.
407407
- `Script`: The script blocks in the remote session.
408408

reference/5.1/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: Import-PowerShellDataFile
1111
# Import-PowerShellDataFile
1212

1313
## SYNOPSIS
14-
Imports values from a `.PSD1` file without invoking its contents.
14+
Imports values from a `.psd1` file without invoking its contents.
1515

1616
## SYNTAX
1717

@@ -30,7 +30,7 @@ Import-PowerShellDataFile [-LiteralPath <string[]>] [<CommonParameters>]
3030
## DESCRIPTION
3131

3232
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a
33-
`.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
33+
`.psd1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
3434
However, `Invoke-Expression` runs any code contained in the file. This could produce unwanted
3535
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the
3636
code.

reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ Invoke-Expression -Command "C:\ps-test\testscript.ps1"
7979
"C:\ps-test\testscript.ps1" | Invoke-Expression
8080
```
8181

82-
These commands use `Invoke-Expression` to run a script, TestScript.ps1, on the local computer. The
82+
These commands use `Invoke-Expression` to run a script, `TestScript.ps1`, on the local computer. The
8383
two commands are equivalent. The first uses the **Command** parameter to specify the command to run.
8484
The second uses a pipeline operator (`|`) to send the command string to `Invoke-Expression`.
8585

8686
### Example 3: Run a command in a variable
8787

8888
```powershell
89-
$Command = 'Get-Process | where {$_.cpu -gt 1000}'
89+
$Command = 'Get-Process | where {$_.CPU -gt 1000}'
9090
Invoke-Expression $Command
9191
```
9292

reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational
3232

3333
PowerShell formats the response based to the data type. For an RSS or ATOM feed, PowerShell returns
3434
the Item or Entry XML nodes. For JavaScript Object Notation (JSON) or XML, PowerShell converts, or
35-
deserializes, the content into `[PSCustomObject]` objects. Comments aren't permitted in the JSON
35+
deserializes, the content into `[pscustomobject]` objects. Comments aren't permitted in the JSON
3636
data.
3737

3838
> [!NOTE]

0 commit comments

Comments
 (0)