Skip to content

Commit ff12955

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 ff12955

40 files changed

+525
-525
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Data_Files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Describes how to use PowerShell data (.psd1) files.
2+
description: Describes how to use PowerShell data (`.psd1`) files.
33
Locale: en-US
44
ms.date: 01/19/2023
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_data_files?view=powershell-5.1&WT.mc_id=ps-gethelp
@@ -55,7 +55,7 @@ you aren't limited to storing string data and don't have to use the data for
5555
localized output.
5656

5757
The data in the file isn't limited to hashtables. It can be in any format
58-
supported by the PowerShell syntax, such as `DATA` sections.
58+
supported by the PowerShell syntax, such as `data` sections.
5959

6060
For more information, see [about_Data_Sections][01].
6161

reference/5.1/Microsoft.PowerShell.Core/About/about_Data_Sections.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,42 @@ title: about_Data_Sections
1010

1111
## Short description
1212

13-
Explains `DATA` sections, which isolate text strings and other read-only
13+
Explains `data` sections, which isolate text strings and other read-only
1414
data from script logic.
1515

1616
## Long description
1717

18-
Scripts that are designed for PowerShell can have one or more `DATA` sections
19-
that contain only data. You can include one or more `DATA` sections in any
20-
script, function, or advanced function. The content of the `DATA` section is
18+
Scripts that are designed for PowerShell can have one or more `data` sections
19+
that contain only data. You can include one or more `data` sections in any
20+
script, function, or advanced function. The content of the `data` section is
2121
restricted to a specified subset of the PowerShell scripting language.
2222

2323
Separating data from code logic makes it easier to identify and manage both
2424
logic and data. It lets you have separate string resource files for text, such
2525
as error messages and Help strings. It also isolates the code logic, which
2626
facilitates security and validation tests.
2727

28-
In PowerShell, you can use the `DATA` section to support script
29-
internationalization. You can use `DATA` sections to make it easier to isolate,
28+
In PowerShell, you can use the `data` section to support script
29+
internationalization. You can use `data` sections to make it easier to isolate,
3030
locate, and process strings that can be translated into other languages.
3131

32-
The `DATA` section was added in PowerShell 2.0 feature.
32+
The `data` section was added in PowerShell 2.0 feature.
3333

3434
### Syntax
3535

36-
The syntax for a `DATA` section is as follows:
36+
The syntax for a `data` section is as follows:
3737

3838
```Syntax
39-
DATA [<variable-name>] [-supportedCommand <cmdlet-name>] {
39+
data [<variable-name>] [-SupportedCommand <cmdlet-name>] {
4040
<Permitted content>
4141
}
4242
```
4343

44-
The `DATA` keyword is required. It isn't case-sensitive. The permitted content
44+
The `data` keyword is required. It isn't case-sensitive. The permitted content
4545
is limited to the following elements:
4646

4747
- All PowerShell operators, except `-match`
48-
- `If`, `Else`, and `ElseIf` statements
48+
- `if`, `else`, and `elseif` statements
4949
- The following automatic variables: `$PSCulture`, `$PSUICulture`, `$true`,
5050
`$false`, and `$null`
5151
- Comments
@@ -60,17 +60,17 @@ is limited to the following elements:
6060
"PowerShell 2.0"
6161
@( "red", "green", "blue" )
6262
@{ a = 0x1; b = "great"; c ="script" }
63-
[XML] @'
63+
[xml] @'
6464
<p> Hello, World </p>
6565
'@
6666
```
6767

68-
- Cmdlets that are permitted in a `DATA` section. By default, only the
68+
- Cmdlets that are permitted in a `data` section. By default, only the
6969
`ConvertFrom-StringData` cmdlet is permitted.
70-
- Cmdlets that you permit in a `DATA` section by using the `-SupportedCommand`
70+
- Cmdlets that you permit in a `data` section by using the `-SupportedCommand`
7171
parameter.
7272

73-
When you use the `ConvertFrom-StringData` cmdlet in a `DATA` section, you can
73+
When you use the `ConvertFrom-StringData` cmdlet in a `data` section, you can
7474
enclose the key-value pairs in single-quoted or double-quoted strings or in
7575
single-quoted or double-quoted here-strings. However, strings that contain
7676
variables and subexpressions must be enclosed in single-quoted strings or in
@@ -81,34 +81,34 @@ subexpressions aren't executable.
8181

8282
The **SupportedCommand** parameter allows you to indicate that a cmdlet or
8383
function generates only data. It's designed to allow users to include cmdlets
84-
and functions in a `DATA` section that they have written or tested.
84+
and functions in a `data` section that they have written or tested.
8585

8686
The value of **SupportedCommand** is a comma-separated list of one or more
8787
cmdlet or function names.
8888

89-
For example, the following `DATA` section includes a user-written cmdlet,
89+
For example, the following `data` section includes a user-written cmdlet,
9090
`Format-Xml`, that formats data in an XML file:
9191

9292
```powershell
93-
DATA -supportedCommand Format-Xml
93+
data -SupportedCommand Format-Xml
9494
{
9595
Format-Xml -Strings string1, string2, string3
9696
}
9797
```
9898

99-
### Using a `DATA` Section
99+
### Using a `data` Section
100100

101-
To use the content of a `DATA` section, assign it to a variable and use
101+
To use the content of a `data` section, assign it to a variable and use
102102
variable notation to access the content.
103103

104-
For example, the following `DATA` section contains a `ConvertFrom-StringData`
104+
For example, the following `data` section contains a `ConvertFrom-StringData`
105105
command that converts the here-string into a hash table. The hash table is
106106
assigned to the `$TextMsgs` variable.
107107

108-
The `$TextMsgs` variable isn't part of the `DATA` section.
108+
The `$TextMsgs` variable isn't part of the `data` section.
109109

110110
```powershell
111-
$TextMsgs = DATA {
111+
$TextMsgs = data {
112112
ConvertFrom-StringData -StringData @'
113113
Text001 = Windows 7
114114
Text002 = Windows Server 2008 R2
@@ -124,11 +124,11 @@ $TextMsgs.Text001
124124
$TextMsgs.Text002
125125
```
126126

127-
Alternately, you can put the variable name in the definition of the `DATA`
127+
Alternately, you can put the variable name in the definition of the `data`
128128
section. For example:
129129

130130
```powershell
131-
DATA TextMsgs {
131+
data TextMsgs {
132132
ConvertFrom-StringData -StringData @'
133133
Text001 = Windows 7
134134
Text002 = Windows Server 2008 R2
@@ -152,7 +152,7 @@ Text002 Windows Server 2008 R2
152152
Simple data strings.
153153

154154
```powershell
155-
DATA {
155+
data {
156156
"Thank you for using my PowerShell Organize.pst script."
157157
"It is provided free of charge to the community."
158158
"I appreciate your comments and feedback."
@@ -162,17 +162,17 @@ DATA {
162162
Strings that include permitted variables.
163163

164164
```powershell
165-
DATA {
165+
data {
166166
if ($null) {
167-
"To get help for this cmdlet, type get-help new-dictionary."
167+
"To get help for this cmdlet, type Get-Help New-Dictionary."
168168
}
169169
}
170170
```
171171

172172
A single-quoted here-string that uses the `ConvertFrom-StringData` cmdlet:
173173

174174
```powershell
175-
DATA {
175+
data {
176176
ConvertFrom-StringData -StringData @'
177177
Text001 = Windows 7
178178
Text002 = Windows Server 2008 R2
@@ -183,7 +183,7 @@ Text002 = Windows Server 2008 R2
183183
A double-quoted here-string that uses the `ConvertFrom-StringData` cmdlet:
184184

185185
```powershell
186-
DATA {
186+
data {
187187
ConvertFrom-StringData -StringData @"
188188
Msg1 = To start, press any key.
189189
Msg2 = To exit, type "quit".
@@ -194,7 +194,7 @@ Msg2 = To exit, type "quit".
194194
A data section that includes a user-written cmdlet that generates data:
195195

196196
```powershell
197-
DATA -supportedCommand Format-XML {
197+
data -SupportedCommand Format-Xml {
198198
Format-Xml -Strings string1, string2, string3
199199
}
200200
```

reference/5.1/Microsoft.PowerShell.Core/About/about_Debuggers.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ menu.
9696
you are debugging a job by running the `Debug-Job` cmdlet, the `Exit` command
9797
detaches the debugger, and allows the job to continue running.
9898

99-
- `k`, `Get-PsCallStack`: Displays the current call stack.
99+
- `k`, `Get-PSCallStack`: Displays the current call stack.
100100

101101
- `<Enter>`: Repeats the last command if it was `Step` (`s`), `StepOver` (`v`),
102102
or `List` (`l`). Otherwise, represents a submit action.
@@ -308,7 +308,7 @@ sections, the debugger breaks at the first line of each section.
308308
For example:
309309

310310
```powershell
311-
function test-cmdlet {
311+
function Test-Cmdlet {
312312
begin {
313313
Write-Output "Begin"
314314
}
@@ -320,32 +320,32 @@ function test-cmdlet {
320320
}
321321
}
322322
323-
C:\PS> Set-PSBreakpoint -Command test-cmdlet
323+
C:\PS> Set-PSBreakpoint -Command Test-Cmdlet
324324
325-
C:\PS> test-cmdlet
325+
C:\PS> Test-Cmdlet
326326
327327
Begin
328328
Entering debug mode. Use h or ? for help.
329329
330-
Hit Command breakpoint on 'prompt:test-cmdlet'
330+
Hit Command breakpoint on 'prompt:Test-Cmdlet'
331331
332-
test-cmdlet
332+
Test-Cmdlet
333333
334334
[DBG]: C:\PS> c
335335
Process
336336
Entering debug mode. Use h or ? for help.
337337
338-
Hit Command breakpoint on 'prompt:test-cmdlet'
338+
Hit Command breakpoint on 'prompt:Test-Cmdlet'
339339
340-
test-cmdlet
340+
Test-Cmdlet
341341
342342
[DBG]: C:\PS> c
343343
End
344344
Entering debug mode. Use h or ? for help.
345345
346-
Hit Command breakpoint on 'prompt:test-cmdlet'
346+
Hit Command breakpoint on 'prompt:Test-Cmdlet'
347347
348-
test-cmdlet
348+
Test-Cmdlet
349349
350350
[DBG]: C:\PS>
351351
```
@@ -436,7 +436,7 @@ function psversion {
436436
"Upgrade to PowerShell 7!"
437437
}
438438
else {
439-
"Have you run a background job today (start-job)?"
439+
"Have you run a background job today (Start-Job)?"
440440
}
441441
}
442442
@@ -545,7 +545,7 @@ steps to the next statement in the script.
545545
```powershell
546546
DBG> o
547547
Windows PowerShell 2.0
548-
Have you run a background job today (start-job)?
548+
Have you run a background job today (Start-Job)?
549549
test.ps1:13 "Done $scriptName"
550550
```
551551

@@ -562,9 +562,9 @@ indicates that the debugger has exited and returned control to the command
562562
processor.
563563

564564
Now, run the debugger again. First, to delete the current breakpoint, use the
565-
`Get-PsBreakpoint` and `Remove-PsBreakpoint` cmdlets. (If you think you might
566-
reuse the breakpoint, use the `Disable-PsBreakpoint` cmdlet instead of
567-
`Remove-PsBreakpoint`.)
565+
`Get-PSBreakpoint` and `Remove-PSBreakpoint` cmdlets. (If you think you might
566+
reuse the breakpoint, use the `Disable-PSBreakpoint` cmdlet instead of
567+
`Remove-PSBreakpoint`.)
568568

569569
```powershell
570570
PS C:\ps-test> Get-PSBreakpoint | Remove-PSBreakpoint
@@ -638,7 +638,7 @@ displayed, but it isn't executed.
638638
```powershell
639639
DBG> v
640640
Windows PowerShell 2.0
641-
Have you run a background job today (start-job)?
641+
Have you run a background job today (Start-Job)?
642642
test.ps1:13 "Done $scriptName"
643643
```
644644

@@ -652,7 +652,7 @@ the standard command prompt.
652652
C:\ps-test>
653653
```
654654

655-
To delete the breakpoints, use the `Get-PsBreakpoint` and `Remove-PsBreakpoint`
655+
To delete the breakpoints, use the `Get-PSBreakpoint` and `Remove-PSBreakpoint`
656656
cmdlets.
657657

658658
```powershell
@@ -688,13 +688,13 @@ the breakpoint or to perform preparatory or diagnostic tasks, such as starting
688688
a log or invoking a diagnostic or security script.
689689

690690
To set an action, use a Continue command (c) to exit the script, and a
691-
`Remove-PsBreakpoint` command to delete the current breakpoint. (Breakpoints
691+
`Remove-PSBreakpoint` command to delete the current breakpoint. (Breakpoints
692692
are read-only, so you can't add an action to the current breakpoint.)
693693

694694
```powershell
695695
DBG> c
696696
Windows PowerShell 2.0
697-
Have you run a background job today (start-job)?
697+
Have you run a background job today (Start-Job)?
698698
Done C:\ps-test\test.ps1
699699
700700
PS C:\ps-test> Get-PSBreakpoint | Remove-PSBreakpoint
@@ -741,7 +741,7 @@ Because the execution policy is set to **RemoteSigned**, execution stops at the
741741
function call.
742742

743743
At this point, you might want to check the call stack. Use the
744-
`Get-PsCallStack` cmdlet or the `Get-PsCallStack` debugger command (`k`). The
744+
`Get-PSCallStack` cmdlet or the `Get-PSCallStack` debugger command (`k`). The
745745
following command gets the current call stack.
746746

747747
```powershell

reference/5.1/Microsoft.PowerShell.Core/About/about_Do.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Runs a statement list one or more times, subject to a While or Until condition.
2+
description: Runs a statement list one or more times, subject to a `while` or `until` condition.
33
Locale: en-US
44
ms.date: 06/10/2021
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_do?view=powershell-5.1&WT.mc_id=ps-gethelp
@@ -9,24 +9,24 @@ title: about_Do
99
# about_Do
1010

1111
## Short description
12-
Runs a statement list one or more times, subject to a `While` or `Until`
12+
Runs a statement list one or more times, subject to a `while` or `until`
1313
condition.
1414

1515
## Long description
1616

17-
The `Do` keyword works with the `While` keyword or the `Until` keyword to run
17+
The `do` keyword works with the `while` keyword or the `until` keyword to run
1818
the statements in a script block, subject to a condition. Unlike the related
19-
`While` loop, the script block in a `Do` loop always runs at least once.
19+
`while` loop, the script block in a `do` loop always runs at least once.
2020

21-
A **Do-While** loop is a variety of the `While` loop. In a **Do-While** loop,
22-
the condition is evaluated after the script block has run. As in a While loop,
23-
the script block is repeated as long as the condition evaluates to true.
21+
A **Do-While** loop is a variety of the `while` loop. In a **Do-While** loop,
22+
the condition is evaluated after the script block has run. As in a `while`
23+
loop, the script block is repeated as long as the condition evaluates to true.
2424

2525
Like a **Do-While** loop, a **Do-Until** loop always runs at least once
2626
before the condition is evaluated. However, the script block runs only
2727
while the condition is false.
2828

29-
The `Continue` and `Break` flow control keywords can be used in a **Do-While**
29+
The `continue` and `break` flow control keywords can be used in a **Do-While**
3030
loop or in a **Do-Until** loop.
3131

3232
### Syntax
@@ -52,7 +52,7 @@ information about how booleans are evaluated, see
5252

5353
### Example
5454

55-
The following example of a `Do` statement counts the items in an array until it
55+
The following example of a `do` statement counts the items in an array until it
5656
reaches an item with a value of 0.
5757

5858
```powershell
@@ -62,7 +62,7 @@ PS> $count
6262
3
6363
```
6464

65-
The following example uses the `Until` keyword. Notice that the not equal to
65+
The following example uses the `until` keyword. Notice that the not equal to
6666
operator (`-ne`) is replaced by the equal to operator (`-eq`).
6767

6868
```powershell

0 commit comments

Comments
 (0)