Skip to content

Commit 1b92794

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 1b92794

40 files changed

+512
-509
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ Invoke-Command -Session $s -ScriptBlock {Get-WinEvent -LogName $ps}
4949
You can use local variables in remote commands, but the variable must be
5050
defined in the local session.
5151

52-
Beginning in PowerShell 3.0, you can use the `Using` scope modifier to identify
53-
a local variable in a remote command.
52+
Beginning in PowerShell 3.0, you can use the `Using:` scope modifier to
53+
identify a local variable in a remote command.
5454

55-
The syntax of `Using` is as follows:
55+
The syntax of `Using:` is as follows:
5656

5757
```
5858
$Using:<VariableName>
5959
```
6060

6161
In the following example, the `$ps` variable is created in the local session,
62-
but is used in the session in which the command runs. The `Using` scope
62+
but is used in the session in which the command runs. The `Using:` scope
6363
modifier identifies `$ps` as a local variable.
6464

6565
```powershell
@@ -69,17 +69,17 @@ Invoke-Command -ComputerName S1 -ScriptBlock {
6969
}
7070
```
7171

72-
The `Using` scope modifier can be used in a **PSSession**.
72+
The `Using:` scope modifier can be used in a **PSSession**.
7373

7474
```powershell
7575
$s = New-PSSession -ComputerName S1
7676
$ps = "*PowerShell*"
7777
Invoke-Command -Session $s -ScriptBlock {Get-WinEvent -LogName $Using:ps}
7878
```
7979

80-
A variable reference such as `$using:var` expands to the value of variable
80+
A variable reference such as `$Using:var` expands to the value of variable
8181
`$var` from the caller's context. You do not get access to the caller's
82-
variable object. The `Using` scope modifier cannot be used to modify a local
82+
variable object. The `Using:` scope modifier cannot be used to modify a local
8383
variable within the **PSSession**. For example, the following code does not
8484
work:
8585

@@ -89,7 +89,7 @@ $ps = "*PowerShell*"
8989
Invoke-Command -Session $s -ScriptBlock {$Using:ps = 'Cannot assign new value'}
9090
```
9191

92-
For more information about `Using`, see [about_Scopes](./about_Scopes.md)
92+
For more information about `Using:`, see [about_Scopes](./about_Scopes.md)
9393

9494
### Using splatting
9595

@@ -98,20 +98,20 @@ command. For more information, see [about_Splatting](about_Splatting.md).
9898

9999
In this example, the splatting variable, `$Splat` is a hash table that is set
100100
up on the local computer. The `Invoke-Command` connects to a remote computer
101-
session. The **ScriptBlock** uses the `Using` scope modifier with the At (`@`)
101+
session. The **ScriptBlock** uses the `Using:` scope modifier with the At (`@`)
102102
symbol to represent the splatted variable.
103103

104104
```powershell
105105
$Splat = @{ Name = "Win*"; Include = "WinRM" }
106106
Invoke-Command -Session $s -ScriptBlock { Get-Service @Using:Splat }
107107
```
108108

109-
### Other situations where the 'Using' scope modifier is needed
109+
### Other situations where the `Using:` scope modifier is needed
110110

111-
For any script or command that executes out of session, you need the `Using`
111+
For any script or command that executes out of session, you need the `Using:`
112112
scope modifier to embed variable values from the calling session scope, so that
113-
out of session code can access them. The `Using` scope modifier is supported in
114-
the following contexts:
113+
out of session code can access them. The `Using:` scope modifier is supported
114+
in the following contexts:
115115

116116
- Remotely executed commands, started with `Invoke-Command` using the
117117
**ComputerName** or **Session** parameter (remote session)
@@ -138,7 +138,7 @@ It has the type properties and methods. For simple types, such as
138138
imperfect. For example, rehydrated certificate objects do not include the
139139
private key.
140140

141-
Instances of all other types are **PSObject** instances. The **PSTypeNames**
141+
Instances of all other types are **PSObject** instances. The **pstypenames**
142142
property contains the original type name prefixed with **Deserialized**, for
143143
example, **Deserialized.System.Data.DataTable**
144144

@@ -158,14 +158,14 @@ cmdlet to specify the local variable as the parameter value.
158158
the local variable as the parameter value.
159159

160160
For example, the following commands define the `$ps` variable in the local
161-
session and then use it in a remote command. The command uses `$log` as the
161+
session and then use it in a remote command. The command uses `$Log` as the
162162
parameter name and the local variable, `$ps`, as its value.
163163

164164
```powershell
165165
$ps = "*PowerShell*"
166166
Invoke-Command -ComputerName S1 -ScriptBlock {
167-
param($log)
168-
Get-WinEvent -LogName $log
167+
param($Log)
168+
Get-WinEvent -LogName $Log
169169
} -ArgumentList $ps
170170
```
171171

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ specified in both statements aren't met, the script doesn't run. Each
232232
```powershell
233233
#Requires -Modules PSWorkflow
234234
#Requires -Version 3
235-
Param
235+
param
236236
(
237-
[parameter(Mandatory=$true)]
238-
[String[]]
237+
[Parameter(Mandatory=$true)]
238+
[string[]]
239239
$Path
240240
)
241241
...

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ their own help articles. To view them, type `Get-Help about_` and add the
4949
keyword. For example, to get information about the `foreach` statement, type:
5050

5151
```powershell
52-
Get-Help about_ForEach
52+
Get-Help about_Foreach
5353
```
5454

5555
For information about the `filter` statement or the `return` statement syntax,

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Users who are familiar with languages like C or C\# might want to use the
2222
`return` keyword to make the logic of leaving a scope explicit.
2323

2424
In PowerShell, the results of each statement are returned as output, even
25-
without a statement that contains the Return keyword. Languages like C or C\#
25+
without a statement that contains the `return` keyword. Languages like C or C\#
2626
return only the value or values that are specified by the `return` keyword.
2727

2828
> [!NOTE]
@@ -58,10 +58,10 @@ because the return statement exits before that statement can execute.
5858
```powershell
5959
function MultiplyEven
6060
{
61-
param($number)
61+
param($Number)
6262
63-
if ($number % 2) { return "$number is not even" }
64-
$number * 2
63+
if ($Number % 2) { return "$Number is not even" }
64+
$Number * 2
6565
}
6666
6767
1..10 | ForEach-Object {MultiplyEven -Number $_}
@@ -99,15 +99,15 @@ The following example includes a statement intended to let the user know that
9999
the function is performing a calculation:
100100

101101
```powershell
102-
function calculation {
103-
param ($value)
102+
function Calculation {
103+
param ($Value)
104104
105105
"Please wait. Working on calculation..."
106-
$value += 73
107-
return $value
106+
$Value += 73
107+
return $Value
108108
}
109109
110-
$a = calculation 14
110+
$a = Calculation 14
111111
```
112112

113113
The "Please wait. Working on calculation..." string is not displayed. Instead,
@@ -128,20 +128,20 @@ the above example using the `Write-Information` cmdlet with a
128128
**InformationAction** set to `Continue`.
129129

130130
```powershell
131-
function calculation {
132-
param ($value)
131+
function Calculation {
132+
param ($Value)
133133
134134
Write-Information "Please wait. Working on calculation..." -InformationAction Continue
135-
$value += 73
136-
return $value
135+
$Value += 73
136+
return $Value
137137
}
138138
```
139139

140140
Now the information message to display in the host and not assigned to the
141141
variable.
142142

143143
```powershell
144-
PS> $a = calculation 14
144+
PS> $a = Calculation 14
145145
Please wait. Working on calculation...
146146
PS> $a
147147
87
@@ -152,7 +152,7 @@ PS> $a
152152
When you return a collection from your script block or function, PowerShell
153153
automatically unrolls the members and passes them one at a time through the
154154
pipeline. This is due to PowerShell's one-at-a-time processing. For more
155-
information, see [about_pipelines](about_pipelines.md).
155+
information, see [about_Pipelines](about_pipelines.md).
156156

157157
This concept is illustrated by the following sample function that returns an
158158
array of numbers. The output from the function is piped to the `Measure-Object`

0 commit comments

Comments
 (0)