Skip to content

Commit 6557c93

Browse files
Fix incorrect case/capitalization in ref docs (#11946)
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 9a678c0 commit 6557c93

26 files changed

+86
-86
lines changed

reference/docs-conceptual/security/app-control/application-control.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ doesn't have way to query the policy enforcement status. To detect if a system w
2323
control policy is being enforced by AppLocker, PowerShell creates two temporary files and tests if
2424
they can be executed. The filenames use the following name format:
2525

26-
- `$env:TEMP/__PSAppLockerTest__<random-8dot3-name>.ps1`
27-
- `$env:TEMP/__PSAppLockerTest__<random-8dot3-name>.psm1`
26+
- `$Env:TEMP/__PSAppLockerTest__<random-8dot3-name>.ps1`
27+
- `$Env:TEMP/__PSAppLockerTest__<random-8dot3-name>.psm1`
2828

2929
App Control for Business is the preferred application control system for Windows. App Control
3030
provides APIs that allow you to discover the policy configuration. App Control is designed as a

reference/docs-conceptual/security/app-control/how-to-use-app-control.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,24 @@ For testing, you just need to create a default policy and a self signed code sig
6363

6464
```powershell
6565
$newSelfSignedCertificateSplat = @{
66-
DnsName = $env:COMPUTERNAME
66+
DnsName = $Env:COMPUTERNAME
6767
CertStoreLocation = "Cert:\CurrentUser\My\"
6868
Type = 'CodeSigningCert'
6969
}
7070
$cert = New-SelfSignedCertificate @newSelfSignedCertificateSplat
71-
Export-Certificate -Cert $cert -FilePath c:\certs\signing.cer
71+
Export-Certificate -Cert $cert -FilePath C:\certs\signing.cer
7272
Import-Certificate -FilePath C:\certs\signing.cer -CertStoreLocation "Cert:\CurrentUser\Root\"
7373
$cert = Get-ChildItem Cert:\CurrentUser\My\ -CodeSigningCert
7474
75-
dir c:\bin\powershell\pwsh.exe | Set-AuthenticodeSignature -Certificate $cert
75+
dir C:\bin\PowerShell\pwsh.exe | Set-AuthenticodeSignature -Certificate $cert
7676
```
7777

7878
1. Add the code signing certificate to the policy
7979

8080
Use the following command to add the new code signing certificate to the policy.
8181

8282
```powershell
83-
Add-SignerRule -FilePath .\SystemCIPolicy.xml -CertificatePath c:\certs\signing.cer -User
83+
Add-SignerRule -FilePath .\SystemCIPolicy.xml -CertificatePath C:\certs\signing.cer -User
8484
```
8585

8686
1. Convert the XML policy file to a policy enforcement binary file
@@ -134,7 +134,7 @@ events.
134134

135135
```powershell
136136
Get-WinEvent -LogName PowerShellCore/Analytic -Oldest |
137-
Where-Object Id -eq 16387 | Format-List
137+
Where-Object Id -EQ 16387 | Format-List
138138
```
139139

140140
```Output

reference/docs-conceptual/security/preventing-script-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ You can use this to automate security analysis during builds, continuous integra
202202
deployments, and other scenarios.
203203

204204
```powershell
205-
$RulePath = (Get-Module -list InjectionHunter).Path
205+
$RulePath = (Get-Module -List InjectionHunter).Path
206206
Invoke-ScriptAnalyzer -CustomRulePath $RulePath -Path .\Invoke-Dangerous.ps1
207207
```
208208

reference/docs-conceptual/security/remoting/PS-remoting-second-hop.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Now let's set up the variables we'll use to represent the servers:
148148

149149
```powershell
150150
# Set up variables for reuse
151-
$ServerA = $env:COMPUTERNAME
151+
$ServerA = $Env:COMPUTERNAME
152152
$ServerB = Get-ADComputer -Identity ServerB
153153
$ServerC = Get-ADComputer -Identity ServerC
154154
```
@@ -202,14 +202,14 @@ $cred = Get-Credential Contoso\Alice
202202
203203
# Test kerberos double hop
204204
Invoke-Command -ComputerName $ServerB.Name -Credential $cred -ScriptBlock {
205-
Test-Path \\$($using:ServerC.Name)\C$
206-
Get-Process lsass -ComputerName $($using:ServerC.Name)
207-
Get-EventLog -LogName System -Newest 3 -ComputerName $($using:ServerC.Name)
205+
Test-Path \\$($Using:ServerC.Name)\C$
206+
Get-Process lsass -ComputerName $($Using:ServerC.Name)
207+
Get-EventLog -LogName System -Newest 3 -ComputerName $($Using:ServerC.Name)
208208
}
209209
```
210210

211-
In this example, the `$using` variable is used to make the `$ServerC` variable visible to _ServerB_.
212-
For more information about the `$using` variable, see [about_Remote_Variables][06].
211+
In this example, the `Using:` scope modifier is used to make the `$ServerC` variable visible to
212+
_ServerB_. For more information about the `Using:` scope modifier, see [about_Remote_Variables][06].
213213

214214
To allow multiple servers to delegate credentials to _ServerC_, set the value of the
215215
**PrincipalsAllowedToDelegateToAccount** parameter on _ServerC_ to an array:

reference/docs-conceptual/security/remoting/Running-Remote-Commands.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ For example, the following command runs the `DiskCollect.ps1` script on the remo
109109
Server01 and Server02.
110110

111111
```powershell
112-
Invoke-Command -ComputerName Server01, Server02 -FilePath c:\Scripts\DiskCollect.ps1
112+
Invoke-Command -ComputerName Server01, Server02 -FilePath C:\Scripts\DiskCollect.ps1
113113
```
114114

115115
### Establish a Persistent Connection
@@ -149,11 +149,11 @@ PowerShell includes cmdlets that allow you to:
149149
- Import commands from a remote session that actually run implicitly on the remote session
150150
- Configure the security of a remote session
151151

152-
PowerShell on Windows includes a WSMan provider. The provider creates a `WSMAN:` drive that lets you
152+
PowerShell on Windows includes a WSMan provider. The provider creates a `WSMan:` drive that lets you
153153
navigate through a hierarchy of configuration settings on the local computer and remote computers.
154154

155155
For more information about the WSMan provider, see [WSMan Provider][07] and
156-
[About WS-Management Cmdlets][06], or in the Windows PowerShell console, type `Get-Help wsman`.
156+
[About WS-Management Cmdlets][06], or in the Windows PowerShell console, type `Get-Help WSMan`.
157157

158158
For more information, see:
159159

reference/docs-conceptual/security/remoting/SSH-Remoting-in-PowerShell.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ remote computer. And, you must enable **password** or **key-based** authenticati
6868
> If you want to set PowerShell as the default shell for OpenSSH, see
6969
> [Configuring Windows for OpenSSH][07].
7070
71-
1. Edit the `sshd_config` file located at `$env:ProgramData\ssh`.
71+
1. Edit the `sshd_config` file located at `$Env:ProgramData\ssh`.
7272

7373
Make sure password authentication is enabled:
7474

@@ -79,15 +79,15 @@ remote computer. And, you must enable **password** or **key-based** authenticati
7979
Create the SSH subsystem that hosts a PowerShell process on the remote computer:
8080

8181
```
82-
Subsystem powershell c:/progra~1/powershell/7/pwsh.exe -sshs -nologo
82+
Subsystem powershell C:/progra~1/powershell/7/pwsh.exe -sshs -NoLogo
8383
```
8484

8585
> [!NOTE]
86-
> Starting in PowerShell 7.4, you no longer need to use the `-nologo` parameter when running
86+
> Starting in PowerShell 7.4, you no longer need to use the `-NoLogo` parameter when running
8787
> PowerShell in SSH server mode.
8888
8989
> [!NOTE]
90-
> The default location of the PowerShell executable is `c:/progra~1/powershell/7/pwsh.exe`. The
90+
> The default location of the PowerShell executable is `C:/progra~1/powershell/7/pwsh.exe`. The
9191
> location can vary depending on how you installed PowerShell.
9292
>
9393
> You must use the 8.3 short name for any file paths that contain spaces. There's a bug in
@@ -105,7 +105,7 @@ remote computer. And, you must enable **password** or **key-based** authenticati
105105
> ```Output
106106
> EightDotThreeFileName
107107
> ---------------------
108-
> c:\progra~1
108+
> C:\progra~1
109109
> ```
110110
111111
Optionally, enable key authentication:
@@ -122,7 +122,7 @@ remote computer. And, you must enable **password** or **key-based** authenticati
122122
Restart-Service sshd
123123
```
124124

125-
1. Add the path where OpenSSH is installed to your Path environment variable. For example,
125+
1. Add the path where OpenSSH is installed to your PATH environment variable. For example,
126126
`C:\Program Files\OpenSSH\`. This entry allows for the `ssh.exe` to be found.
127127

128128
## Install the SSH service on an Ubuntu Linux computer
@@ -155,15 +155,15 @@ remote computer. And, you must enable **password** or **key-based** authenticati
155155
Add a PowerShell subsystem entry:
156156

157157
```
158-
Subsystem powershell /usr/bin/pwsh -sshs -nologo
158+
Subsystem powershell /usr/bin/pwsh -sshs -NoLogo
159159
```
160160

161161
> [!NOTE]
162162
> The default location of the PowerShell executable is `/usr/bin/pwsh`. The location can vary
163163
> depending on how you installed PowerShell.
164164
165165
> [!NOTE]
166-
> Starting in PowerShell 7.4, you no longer need to use the `-nologo` parameter when running
166+
> Starting in PowerShell 7.4, you no longer need to use the `-NoLogo` parameter when running
167167
> PowerShell in SSH server mode.
168168
169169
1. Restart the **ssh** service.
@@ -202,15 +202,15 @@ remote computer. And, you must enable **password** or **key-based** authenticati
202202
Add a PowerShell subsystem entry:
203203

204204
```
205-
Subsystem powershell /usr/local/bin/pwsh -sshs -nologo
205+
Subsystem powershell /usr/local/bin/pwsh -sshs -NoLogo
206206
```
207207

208208
> [!NOTE]
209209
> The default location of the PowerShell executable is `/usr/local/bin/pwsh`. The location can
210210
> vary depending on how you installed PowerShell.
211211
212212
> [!NOTE]
213-
> Starting in PowerShell 7.4, you no longer need to use the `-nologo` parameter when running
213+
> Starting in PowerShell 7.4, you no longer need to use the `-NoLogo` parameter when running
214214
> PowerShell in SSH server mode.
215215
216216
Optionally, enable key authentication:

reference/docs-conceptual/security/remoting/jea/role-capabilities.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: >-
3-
A role capability is a PowerShell data file with the .psrc extension that lists all the cmdlets,
3+
A role capability is a PowerShell data file with the `.psrc` extension that lists all the cmdlets,
44
functions, providers, and external programs that are made available to connecting users.
55
ms.date: 02/02/2023
66
title: JEA Role Capabilities
@@ -300,21 +300,21 @@ module. You make those functions visible in the JEA session using the **VisibleF
300300
like you would with built-in and third-party modules.
301301

302302
For tab completion to work properly in JEA sessions you must include the built-in function
303-
`tabexpansion2` in the **VisibleFunctions** list.
303+
`TabExpansion2` in the **VisibleFunctions** list.
304304

305305
## Make the role capabilities available to a configuration
306306

307307
Prior to PowerShell 6, for PowerShell to find a role capability file it must be stored in a
308308
`RoleCapabilities` folder in a PowerShell module. The module can be stored in any folder included
309-
in the `$env:PSModulePath` environment variable, however you shouldn't place it in
310-
`$env:SystemRoot\System32` or a folder where untrusted users could modify the files.
309+
in the `$Env:PSModulePath` environment variable, however you shouldn't place it in
310+
`$Env:SystemRoot\System32` or a folder where untrusted users could modify the files.
311311

312312
The following example creates a PowerShell script module called **ContosoJEA** in the
313-
`$env:ProgramFiles` path to host the role capabilities file.
313+
`$Env:ProgramFiles` path to host the role capabilities file.
314314

315315
```powershell
316316
# Create a folder for the module
317-
$modulePath = Join-Path $env:ProgramFiles "WindowsPowerShell\Modules\ContosoJEA"
317+
$modulePath = Join-Path $Env:ProgramFiles "WindowsPowerShell\Modules\ContosoJEA"
318318
New-Item -ItemType Directory -Path $modulePath
319319
320320
# Create an empty script module and module manifest.

reference/docs-conceptual/security/remoting/jea/session-configurations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ to the following default commands (and aliases):
4848

4949
No PowerShell providers are available, nor are any external programs (executables or scripts).
5050

51-
For more information about language modes, see [about_Language_modes][01].
51+
For more information about language modes, see [about_Language_Modes][01].
5252

5353
### Choose the JEA identity
5454

@@ -191,7 +191,7 @@ to the user.
191191

192192
When specifying local users or groups in the role definitions field, be sure to use the computer
193193
name, not **localhost** or wildcards. You can check the computer name by inspecting the
194-
`$env:COMPUTERNAME` variable.
194+
`$Env:COMPUTERNAME` variable.
195195

196196
```powershell
197197
RoleDefinitions = @{
@@ -207,7 +207,7 @@ capabilities are available on the system with the same name, PowerShell uses its
207207
order to select the effective role capability file. JEA does **not** give access to all role
208208
capability files with the same name.
209209

210-
JEA uses the `$env:PSModulePath` environment variable to determine which paths to scan for role
210+
JEA uses the `$Env:PSModulePath` environment variable to determine which paths to scan for role
211211
capability files. Within each of those paths, JEA looks for valid PowerShell modules that contain a
212212
"RoleCapabilities" subfolder. As with importing modules, JEA prefers role capabilities that are
213213
shipped with Windows to custom role capabilities with the same name.

reference/docs-conceptual/security/remoting/powershell-remoting-faq.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ sections:
8888
8989
These cmdlets include the following:
9090
91-
- `Get-Hotfix`
91+
- `Get-HotFix`
9292
- `Rename-Computer`
9393
- `Restart-Computer`
9494
- `Stop-Computer`
@@ -112,7 +112,7 @@ sections:
112112
For example:
113113
114114
```PowerShell
115-
Get-Help Get-Hotfix -Parameter ComputerName
115+
Get-Help Get-HotFix -Parameter ComputerName
116116
```
117117
118118
For all other commands, use the `Invoke-Command` cmdlet.
@@ -326,7 +326,7 @@ sections:
326326
[about_Remote_Jobs](/powershell/module/microsoft.powershell.core/about/about_remote_jobs).
327327
328328
- question: |
329-
Can I run windows programs on a remote computer?
329+
Can I run Windows programs on a remote computer?
330330
answer: |
331331
You can use PowerShell remote commands to run Windows-based programs on remote computers.
332332
For example, you can run `Shutdown.exe` or `Ipconfig.exe` on a remote computer.

reference/docs-conceptual/whats-new/Migrating-from-Windows-PowerShell-51-to-PowerShell-7.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ PowerShell 7 installs to a new directory, enabling side-by-side execution with W
7676

7777
Install locations by version:
7878

79-
- Windows PowerShell 5.1: `$env:WINDIR\System32\WindowsPowerShell\v1.0`
80-
- PowerShell 6.x: `$env:ProgramFiles\PowerShell\6`
81-
- PowerShell 7: `$env:ProgramFiles\PowerShell\7`
79+
- Windows PowerShell 5.1: `$Env:windir\System32\WindowsPowerShell\v1.0`
80+
- PowerShell 6.x: `$Env:ProgramFiles\PowerShell\6`
81+
- PowerShell 7: `$Env:ProgramFiles\PowerShell\7`
8282

8383
The new location is added to your PATH allowing you to run both Windows PowerShell 5.1 and
8484
PowerShell 7. If you're migrating from PowerShell 6.x to PowerShell 7, PowerShell 6 is removed and
@@ -97,8 +97,8 @@ load both Core and Desktop modules.
9797

9898
| Install Scope | Windows PowerShell 5.1 | PowerShell 7.0 |
9999
| ----------------------------------- | ----------------------------------------------------- | ---------------------------------------- |
100-
| PowerShell modules | `$env:WINDIR\system32\WindowsPowerShell\v1.0\Modules` | `$env:ProgramFiles\PowerShell\7\Modules` |
101-
| User installed<br>AllUsers scope | `$env:ProgramFiles\WindowsPowerShell\Modules` | `$env:ProgramFiles\PowerShell\Modules` |
100+
| PowerShell modules | `$Env:windir\system32\WindowsPowerShell\v1.0\Modules` | `$Env:ProgramFiles\PowerShell\7\Modules` |
101+
| User installed<br>AllUsers scope | `$Env:ProgramFiles\WindowsPowerShell\Modules` | `$Env:ProgramFiles\PowerShell\Modules` |
102102
| User installed<br>CurrentUser scope | `$HOME\Documents\WindowsPowerShell\Modules` | `$HOME\Documents\PowerShell\Modules` |
103103

104104
The following examples show the default values of `$Env:PSModulePath` for each version.

0 commit comments

Comments
 (0)