Skip to content

Commit a0cf2c6

Browse files
Fix incorrect case/capitalization in ref docs (#11927)
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 e6dea04 commit a0cf2c6

40 files changed

+203
-203
lines changed

reference/5.1/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cmdlet runs, that signature is removed.
5252

5353
### Example 1 - Sign a script using a certificate from the local certificate store
5454

55-
These commands retrieve a code-signing certificate from the PowerShell certificate provider and use
55+
These commands retrieve a code-signing certificate from the PowerShell Certificate provider and use
5656
it to sign a PowerShell script.
5757

5858
```powershell
@@ -65,10 +65,10 @@ $signingParameters = @{
6565
Set-AuthenticodeSignature @signingParameters
6666
```
6767

68-
The first command uses the `Get-ChildItem` cmdlet and the PowerShell certificate provider to get the
68+
The first command uses the `Get-ChildItem` cmdlet and the PowerShell Certificate provider to get the
6969
certificates in the `Cert:\CurrentUser\My` subdirectory of the certificate store. The `Cert:` drive
70-
is the drive exposed by the certificate provider. The **CodeSigningCert** parameter, which is
71-
supported only by the certificate provider, limits the certificates retrieved to those with
70+
is the drive exposed by the Certificate provider. The **CodeSigningCert** parameter, which is
71+
supported only by the Certificate provider, limits the certificates retrieved to those with
7272
code-signing authority. The command stores the result in the `$cert` variable.
7373

7474
The second command defines the `$signingParameters` variable as a **HashTable** with the parameters

reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ MachinePolicy Undefined
165165
### Example 6: Set the execution policy for the current PowerShell session
166166

167167
The `Process` scope only affects the current PowerShell session. The execution policy is saved in
168-
the environment variable `$env:PSExecutionPolicyPreference` and is deleted when the session is
168+
the environment variable `$Env:PSExecutionPolicyPreference` and is deleted when the session is
169169
closed.
170170

171171
```powershell
@@ -310,7 +310,7 @@ The effective execution policy is determined by the order of precedence as follo
310310
- `CurrentUser` - Affects only the current user
311311

312312
The `Process` scope only affects the current PowerShell session. The execution policy is saved in
313-
the environment variable `$env:PSExecutionPolicyPreference`, rather than the registry. When the
313+
the environment variable `$Env:PSExecutionPolicyPreference`, rather than the registry. When the
314314
PowerShell session is closed, the variable and value are deleted.
315315

316316
Execution policies for the `CurrentUser` scope are written to the registry hive `HKEY_LOCAL_USER`.

reference/5.1/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The following example gets an encrypted event from the PowerShell event log and
9494

9595
```powershell
9696
$event = Get-WinEvent Microsoft-Windows-PowerShell/Operational -MaxEvents 1 |
97-
Where-Object Id -eq 4104
97+
Where-Object Id -EQ 4104
9898
Unprotect-CmsMessage -EventLogRecord $event
9999
```
100100

@@ -105,7 +105,7 @@ using `Unprotect-CmsMessage`.
105105

106106
```powershell
107107
Get-WinEvent Microsoft-Windows-PowerShell/Operational |
108-
Where-Object Id -eq 4104 |
108+
Where-Object Id -EQ 4104 |
109109
Unprotect-CmsMessage
110110
```
111111

@@ -196,7 +196,7 @@ Accept wildcard characters: False
196196
197197
Specifies one or more CMS message recipients, identified in any of the following formats:
198198
199-
- An actual certificate (as retrieved from the certificate provider).
199+
- An actual certificate (as retrieved from the Certificate provider).
200200
- Path to the a file containing the certificate.
201201
- Path to a directory containing the certificate.
202202
- Thumbprint of the certificate (used to look in the certificate store).

reference/5.1/Microsoft.PowerShell.Utility/Add-Member.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The third command uses dot notation to get the value of the **Status** property
8989
`$a`. As the output shows, the value is `Done`.
9090

9191
```powershell
92-
$A = Get-ChildItem c:\ps-test\test.txt
92+
$A = Get-ChildItem C:\ps-test\test.txt
9393
$A | Add-Member -NotePropertyName Status -NotePropertyValue Done
9494
$A.Status
9595
```
@@ -142,7 +142,7 @@ Display
142142

143143
This example adds the **SizeInMB** script method to a **FileInfo** object that calculates the file
144144
size to the nearest MegaByte. The second command creates a **ScriptBlock** that uses the **Round**
145-
static method from the `[math]` type to round the file size to the second decimal place.
145+
static method from the `[Math]` type to round the file size to the second decimal place.
146146

147147
The **Value** parameter also uses the `$this` automatic variable, which represents the current
148148
object. The `$this` variable is valid only in script blocks that define new properties and methods.
@@ -152,7 +152,7 @@ The last command uses dot notation to call the new **SizeInMB** script method on
152152

153153
```powershell
154154
$A = Get-ChildItem C:\Temp\test.txt
155-
$S = {[math]::Round(($this.Length / 1MB), 2)}
155+
$S = {[Math]::Round(($this.Length / 1MB), 2)}
156156
$A | Add-Member -MemberType ScriptMethod -Name "SizeInMB" -Value $S
157157
$A.SizeInMB()
158158
```
@@ -173,7 +173,7 @@ Piping `$Asset` to `Add-Member` adds the key-value pairs in the dictionary to th
173173
in alphabetical order, not in the order that they were added.
174174

175175
```powershell
176-
$Asset = New-Object -TypeName PSObject
176+
$Asset = New-Object -TypeName psobject
177177
$Asset | Add-Member -NotePropertyMembers @{Name="Server30"} -TypeName Asset
178178
$Asset | Add-Member -NotePropertyMembers @{System="Server Core"}
179179
$Asset | Add-Member -NotePropertyMembers @{PSVersion="4.0"}
@@ -191,7 +191,7 @@ System NoteProperty string System=Server Core
191191
```
192192

193193
```powershell
194-
$Asset.PSObject.Properties | Format-Table Name, MemberType, TypeNameOfValue, Value
194+
$Asset.psobject.Properties | Format-Table Name, MemberType, TypeNameOfValue, Value
195195
```
196196

197197
```Output
@@ -216,14 +216,14 @@ PS> $obj = [pscustomobject]@{
216216
Name = 'Doris'
217217
Age = '20'
218218
}
219-
PS> $obj | Add-Member -MemberType AliasProperty -Name 'intAge' -Value age -SecondValue uint32
219+
PS> $obj | Add-Member -MemberType AliasProperty -Name 'IntAge' -Value Age -SecondValue uint32
220220
PS> $obj | Get-Member
221221
222222
TypeName: System.Management.Automation.PSCustomObject
223223
224224
Name MemberType Definition
225225
---- ---------- ----------
226-
intAge AliasProperty intAge = (System.UInt32)age
226+
IntAge AliasProperty IntAge = (System.UInt32)Age
227227
Equals Method bool Equals(System.Object obj)
228228
GetHashCode Method int GetHashCode()
229229
GetType Method type GetType()
@@ -235,18 +235,18 @@ PS> $obj
235235
236236
Name : Doris
237237
Age : 20
238-
intAge : 20
238+
IntAge : 20
239239
240240
PS> $obj.Age + 1
241241
242242
201
243243
244-
PS> $obj.intAge + 1
244+
PS> $obj.IntAge + 1
245245
246246
21
247247
```
248248

249-
The **intAge** property is an **AliasProperty** for the **Age** property, but the type is guaranteed
249+
The **IntAge** property is an **AliasProperty** for the **Age** property, but the type is guaranteed
250250
to be **uint32**.
251251

252252
### Example 7: Add get and set methods to a custom object

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ In this example, we are comparing a string to a **TimeSpan** object. In the firs
232232
is converted to a **TimeSpan** so the objects are equal.
233233

234234
```powershell
235-
Compare-Object ([TimeSpan]"0:0:1") "0:0:1" -IncludeEqual
235+
Compare-Object ([timespan]"0:0:1") "0:0:1" -IncludeEqual
236236
```
237237

238238
```Output
@@ -242,7 +242,7 @@ InputObject SideIndicator
242242
```
243243

244244
```powershell
245-
Compare-Object "0:0:1" ([TimeSpan]"0:0:1")
245+
Compare-Object "0:0:1" ([timespan]"0:0:1")
246246
```
247247

248248
```Output
@@ -406,7 +406,7 @@ Accept wildcard characters: False
406406

407407
Specifies the number of adjacent objects that `Compare-Object` inspects while looking for a match in
408408
a collection of objects. `Compare-Object` examines adjacent objects when it doesn't find the object
409-
in the same position in a collection. The default value is `[Int32]::MaxValue`, which means that
409+
in the same position in a collection. The default value is `[int32]::MaxValue`, which means that
410410
`Compare-Object` examines the entire object collection.
411411

412412
When working with large collections, the default value might not be efficient but is accurate.
@@ -420,7 +420,7 @@ Aliases:
420420
421421
Required: False
422422
Position: Named
423-
Default value: [Int32]::MaxValue
423+
Default value: [int32]::MaxValue
424424
Accept pipeline input: False
425425
Accept wildcard characters: False
426426
```

reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ This example shows how to use the `ConvertFrom-Json` cmdlet to convert a JSON fi
9696
custom object.
9797

9898
```powershell
99-
Get-Content -Raw JsonFile.JSON | ConvertFrom-Json
99+
Get-Content -Raw JsonFile.json | ConvertFrom-Json
100100
```
101101

102102
The command uses Get-Content cmdlet to get the strings in a JSON file. The **Raw** parameter

reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry
6565
```powershell
6666
$acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\
6767
68-
ConvertFrom-SddlString -Sddl $acl.Sddl | Foreach-Object {$_.DiscretionaryAcl[0]}
68+
ConvertFrom-SddlString -Sddl $acl.Sddl | ForEach-Object {$_.DiscretionaryAcl[0]}
6969
7070
BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey)
7171
72-
ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | Foreach-Object {$_.DiscretionaryAcl[0]}
72+
ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | ForEach-Object {$_.DiscretionaryAcl[0]}
7373
7474
BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey)
7575
```
@@ -88,7 +88,7 @@ rights returned are for registry.
8888
### Example 4: Convert Active Directory access rights SDDL to a PSCustomObject
8989

9090
```powershell
91-
$user = [ADSI]"LDAP://CN=username,CN=Users,DC=domain,DC=com"
91+
$user = [adsi]"LDAP://CN=username,CN=Users,DC=domain,DC=com"
9292
ConvertFrom-SddlString $user.psbase.ObjectSecurity.Sddl -Type ActiveDirectoryRights
9393
```
9494

reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ used as the input format. By default, the **key** must be separated from the **v
2727
sign (`=`) character.
2828

2929
The `ConvertFrom-StringData` cmdlet is considered to be a safe cmdlet that can be used in the
30-
**DATA** section of a script or function. When used in a **DATA** section, the contents of the
31-
string must conform to the rules for a **DATA** section. For more information, see
30+
`data` section of a script or function. When used in a `data` section, the contents of the
31+
string must conform to the rules for a `data` section. For more information, see
3232
[about_Data_Sections](../Microsoft.PowerShell.Core/About/about_Data_Sections.md).
3333

3434
`ConvertFrom-StringData` supports escape character sequences that are allowed by conventional
@@ -115,13 +115,13 @@ Top Red
115115
To satisfy the condition that each key-value pair must be on a separate line, the string uses the
116116
PowerShell newline character (`` `n ``) to separate the pairs.
117117

118-
### Example 4: Use in the `DATA` section of a script
118+
### Example 4: Use in the `data` section of a script
119119

120-
This example shows a `ConvertFrom-StringData` command used in the `DATA` section of a script.
121-
The statements below the **DATA** section display the text to the user.
120+
This example shows a `ConvertFrom-StringData` command used in the `data` section of a script.
121+
The statements below the `data` section display the text to the user.
122122

123123
```powershell
124-
$TextMsgs = DATA {
124+
$TextMsgs = data {
125125
ConvertFrom-StringData @'
126126
Text001 = The $Notebook variable contains the name of the user's system notebook.
127127
Text002 = The $MyNotebook variable contains the name of the user's private notebook.
@@ -138,7 +138,7 @@ Text002 The $MyNotebook variable contains the name of the user's privat
138138
```
139139

140140
Because the text includes variable names, it must be enclosed in a single-quoted string so that the
141-
variables are interpreted literally and not expanded. Variables aren't permitted in the `DATA`
141+
variables are interpreted literally and not expanded. Variables aren't permitted in the `data`
142142
section.
143143

144144
### Example 5: Use the pipeline operator to pass a string
@@ -198,13 +198,13 @@ path to render correctly in the resulting `ConvertFrom-StringData` hash table. T
198198
ensures that the literal backslash characters render correctly in the hash table output.
199199

200200
```powershell
201-
ConvertFrom-StringData "Message=Look in c:\\Windows\\System32"
201+
ConvertFrom-StringData "Message=Look in C:\\Windows\\System32"
202202
```
203203

204204
```Output
205205
Name Value
206206
---- -----
207-
Message Look in c:\Windows\System32
207+
Message Look in C:\Windows\System32
208208
```
209209

210210
## PARAMETERS

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ ConvertTo-Csv [-InputObject] <psobject> [-UseCulture] [-NoTypeInformation] [<Com
3030

3131
## DESCRIPTION
3232

33-
The `ConvertTo-CSV` cmdlet returns a series of character-separated value (CSV) strings that
33+
The `ConvertTo-Csv` cmdlet returns a series of character-separated value (CSV) strings that
3434
represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate
3535
objects from the CSV strings. The objects converted from CSV are string values of the original
3636
objects that contain property values and no methods.
3737

38-
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-CSV` is similar to
39-
`ConvertTo-CSV`, except that it saves the CSV strings to a file.
38+
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-Csv` is similar to
39+
`ConvertTo-Csv`, except that it saves the CSV strings to a file.
4040

41-
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the
41+
The `ConvertTo-Csv` cmdlet has parameters to specify a delimiter other than a comma or use the
4242
current culture as the delimiter.
4343

4444
## EXAMPLES
@@ -57,8 +57,8 @@ Get-Process -Name 'PowerShell' | ConvertTo-Csv -NoTypeInformation
5757
```
5858

5959
The `Get-Process` cmdlet gets the **Process** object and uses the **Name** parameter to specify the
60-
PowerShell process. The process object is sent down the pipeline to the `ConvertTo-CSV` cmdlet. The
61-
`ConvertTo-CSV` cmdlet converts the object to CSV strings. The **NoTypeInformation** parameter
60+
PowerShell process. The process object is sent down the pipeline to the `ConvertTo-Csv` cmdlet. The
61+
`ConvertTo-Csv` cmdlet converts the object to CSV strings. The **NoTypeInformation** parameter
6262
removes the **#TYPE** information header from the CSV output.
6363

6464
### Example 2: Convert a DateTime object to CSV
@@ -127,7 +127,7 @@ Accept wildcard characters: False
127127
### -InputObject
128128
129129
Specifies the objects that are converted to CSV strings. Enter a variable that contains the objects
130-
or type a command or expression that gets the objects. You can also pipe objects to `ConvertTo-CSV`.
130+
or type a command or expression that gets the objects. You can also pipe objects to `ConvertTo-Csv`.
131131

132132
```yaml
133133
Type: System.Management.Automation.PSObject
@@ -198,7 +198,7 @@ This cmdlet returns one or more strings representing each converted object.
198198

199199
In CSV format, each object is represented by a character-separated list of its property value. The
200200
property values are converted to strings using the object's **ToString()** method. The strings are
201-
represented by the property value name. `ConvertTo-CSV` does not export the object's methods.
201+
represented by the property value name. `ConvertTo-Csv` does not export the object's methods.
202202

203203
The CSV strings are output as follows:
204204

@@ -208,7 +208,7 @@ The CSV strings are output as follows:
208208
contain the first object's property names as a comma-separated list.
209209
- The remaining strings contain comma-separated lists of each object's property values.
210210

211-
When you submit multiple objects to `ConvertTo-CSV`, `ConvertTo-CSV` orders the strings based on the
211+
When you submit multiple objects to `ConvertTo-Csv`, `ConvertTo-Csv` orders the strings based on the
212212
properties of the first object that you submit. If the remaining objects do not have one of the
213213
specified properties, the property value of that object is Null, as represented by two consecutive
214214
commas. If the remaining objects have additional properties, those property values are ignored.

reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ attribute in the tag contains the name of the style sheet.
132132
### Example 6: Create a web page to display service objects
133133

134134
```powershell
135-
Get-Service | ConvertTo-Html -As LIST | Out-File services.htm
135+
Get-Service | ConvertTo-Html -As List | Out-File services.htm
136136
```
137137

138138
This command creates an HTML page of the service objects that the `Get-Service` cmdlet returns. The
@@ -167,15 +167,15 @@ omitted.
167167
### Example 8: Create a web page to display PowerShell events
168168

169169
```powershell
170-
Get-EventLog -Log "Windows PowerShell" | ConvertTo-Html -Property id, level, task
170+
Get-EventLog -Log "Windows PowerShell" | ConvertTo-Html -Property Id, Level, Task
171171
```
172172

173173
This command uses the `Get-EventLog` cmdlet to get events from the Windows PowerShell event log.
174174

175175
It uses a pipeline operator (`|`) to send the events to the `ConvertTo-Html` cmdlet, which converts
176176
the events to HTML format.
177177

178-
The `ConvertTo-Html` command uses the **Property** parameter to select only the **ID**, **Level**,
178+
The `ConvertTo-Html` command uses the **Property** parameter to select only the **Id**, **Level**,
179179
and **Task** properties of the event.
180180

181181
### Example 9: Create a web page to display specified services

0 commit comments

Comments
 (0)