Skip to content

Commit 1142e36

Browse files
Fix automatic variable case (#11833)
1 parent def7e34 commit 1142e36

40 files changed

+96
-96
lines changed

reference/5.1/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ local computer.
6060
Use the **Name** parameter to identify the session configuration that you want to change. Use the
6161
other parameters to specify new values for the properties of the session configuration. To delete a
6262
property value from the configuration, and use the default value, enter an empty string (`""`) or a
63-
value of `$Null` for the corresponding parameter.
63+
value of `$null` for the corresponding parameter.
6464

6565
Starting in PowerShell 3.0, you can use a session configuration file to define a session
6666
configuration. This feature provides a simple and discoverable method for setting and changing the
@@ -104,7 +104,7 @@ The third command removes the `AdminConfig.ps1` script from the configuration.
104104
```powershell
105105
Register-PSSessionConfiguration -Name "AdminShell" -AssemblyName "C:\Shells\AdminShell.dll" -ConfigurationTypeName "AdminClass"
106106
Set-PSSessionConfiguration -Name "AdminShell" -StartupScript "AdminConfig.ps1"
107-
Set-PSSessionConfiguration -Name "AdminShell" -StartupScript $Null
107+
Set-PSSessionConfiguration -Name "AdminShell" -StartupScript $null
108108
```
109109

110110
### Example 3: Display results
@@ -490,7 +490,7 @@ use a session configuration in a session, users must have at least `Execute(Invo
490490
the configuration.
491491

492492
To use the default security descriptor for the configuration, enter an empty string (`""`) or a
493-
value of `$Null`. The default is the root SDDL in the `WSMan:` drive.
493+
value of `$null`. The default is the root SDDL in the `WSMan:` drive.
494494

495495
If the security descriptor is complex, consider using the **ShowSecurityDescriptorUI** parameter
496496
instead of this one. You cannot use both parameters in the same command.
@@ -562,7 +562,7 @@ Specifies the startup script for the configuration. Enter the fully qualified pa
562562
script. The specified script runs in the new session that uses the session configuration.
563563

564564
To delete a startup script from a session configuration, enter an empty string (`""`) or a value of
565-
`$Null`.
565+
`$null`.
566566

567567
You can use a startup script to further configure the user session. If the script generates an
568568
error, even a non-terminating error, the session is not created and the `New-PSSession` command

reference/5.1/Microsoft.PowerShell.Core/Set-StrictMode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ override the setting inherited from the global scope.
4040

4141
When `Set-StrictMode` is off, PowerShell has the following behaviors:
4242

43-
- Uninitialized variables are assumed to have a value of `0` (zero) or `$Null`, depending on type
44-
- References to non-existent properties return `$Null`
43+
- Uninitialized variables are assumed to have a value of `0` (zero) or `$null`, depending on type
44+
- References to non-existent properties return `$null`
4545
- Results of improper function syntax vary with the error conditions
46-
- Attempting to retrieve a value using an invalid index in an array returns `$Null`
46+
- Attempting to retrieve a value using an invalid index in an array returns `$null`
4747

4848
## EXAMPLES
4949

@@ -151,7 +151,7 @@ which nothing is added. With version `2.0` strict mode, it's correctly interpret
151151
syntax for submitting two values.
152152

153153
Without version `2.0`, the reference to the non-existent **Month** property of a string returns only
154-
`$Null`. With version `2.0`, it's interpreted correctly as a reference error.
154+
`$null`. With version `2.0`, it's interpreted correctly as a reference error.
155155

156156
### Example 3: Turn on strict mode as version 3.0
157157

reference/5.1/Microsoft.PowerShell.Core/Test-ModuleManifest.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@ cmdlet also generates an error for each missing file.
3636
### Example 1: Test a manifest
3737

3838
```powershell
39-
Test-ModuleManifest -Path "$pshome\Modules\TestModule.psd1"
39+
Test-ModuleManifest -Path "$PSHOME\Modules\TestModule.psd1"
4040
```
4141

4242
This command tests the `TestModule.psd1` module manifest.
4343

4444
### Example 2: Test a manifest by using the pipeline
4545

4646
```powershell
47-
"$pshome\Modules\TestModule.psd1" | test-modulemanifest
47+
"$PSHOME\Modules\TestModule.psd1" | test-modulemanifest
4848
```
4949

5050
```Output
5151
Test-ModuleManifest : The specified type data file 'C:\Windows\System32\Wi
5252
ndowsPowerShell\v1.0\Modules\TestModule\TestTypes.ps1xml' could not be processed because the file was not found. Please correct the path and try again.
5353
At line:1 char:34
54-
+ "$pshome\Modules\TestModule.psd1" | test-modulemanifest <<<<
54+
+ "$PSHOME\Modules\TestModule.psd1" | test-modulemanifest <<<<
5555
+ CategoryInfo : ResourceUnavailable: (C:\Windows\System32\WindowsPowerShell\v1.0\Modules\TestModule\TestTypes.ps1xml:String) [Test-ModuleManifest], FileNotFoundException
5656
+ FullyQualifiedErrorId : Modules_TypeDataFileNotFound,Microsoft.PowerShell.Commands.TestModuleManifestCommandName
5757
@@ -87,7 +87,7 @@ function Test-ManifestBool ($path)
8787
```
8888

8989
This function is like `Test-ModuleManifest`, but it returns a Boolean value. The function returns
90-
`$True` if the manifest passed the test and `$false` otherwise.
90+
`$true` if the manifest passed the test and `$false` otherwise.
9191

9292
The function uses the Get-ChildItem cmdlet, alias = dir, to get the module manifest specified by the
9393
`$path` variable. The command uses a pipeline operator (`|`) to pass the file object to
@@ -99,7 +99,7 @@ object that `Test-ModuleManifest` returns in the $a variable. Therefore, the obj
9999
displayed.
100100

101101
Then, in a separate command, the function displays the value of the `$?` automatic variable. If the
102-
previous command generates no error, the command displays `$True`, and `$false` otherwise.
102+
previous command generates no error, the command displays `$true`, and `$false` otherwise.
103103

104104
You can use this function in conditional statements, such as those that might precede an
105105
`Import-Module` command or a command that uses the module.

reference/5.1/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>]
2323
This cmdlet verifies that a session configuration file contains valid keys and the values are of the
2424
correct type. For enumerated values, the cmdlet verifies that the specified values are valid.
2525

26-
The cmdlet returns `$True` if the file passes all tests and `$false` if it does not. To find any
26+
The cmdlet returns `$true` if the file passes all tests and `$false` if it does not. To find any
2727
errors, use the **Verbose** parameter.
2828

2929
`Test-PSSessionConfigurationFile` verifies the session configuration files, such as those created by

reference/5.1/Microsoft.PowerShell.Core/Where-Object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Get-Command | Where-Object { $_.OutputType }
357357

358358
```powershell
359359
# Use Where-Object to get objects that are containers. This gets objects that
360-
# have the **PSIsContainer** property with a value of $True and excludes all
360+
# have the **PSIsContainer** property with a value of $true and excludes all
361361
# others.
362362
Get-ChildItem | Where-Object PSIsContainer
363363
Get-ChildItem | Where-Object { $_.PSIsContainer }

reference/5.1/Microsoft.PowerShell.Management/Add-Content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The steps to create a read-only file are included in the example.
131131

132132
```powershell
133133
New-Item -Path .\IsReadOnlyTextFile.txt -ItemType File
134-
Set-ItemProperty -Path .\IsReadOnlyTextFile.txt -Name IsReadOnly -Value $True
134+
Set-ItemProperty -Path .\IsReadOnlyTextFile.txt -Name IsReadOnly -Value $true
135135
Get-ChildItem -Path .\IsReadOnlyTextFile.txt
136136
Add-Content -Path .\IsReadOnlyTextFile.txt -Value 'Add value to read-only text file' -Force
137137
Get-Content -Path .\IsReadOnlyTextFile.txt

reference/5.1/Microsoft.PowerShell.Management/Get-Process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cmdlet, then to the `Format-Table` cmdlet, which formats the processes by using
121121
view.
122122

123123
The **Priority** view, and other views, are defined in the PS1XML format files in the PowerShell
124-
home directory (`$pshome`).
124+
home directory (`$PSHOME`).
125125

126126
### Example 5: Add a property to the standard Get-Process output display
127127

reference/5.1/Microsoft.PowerShell.Management/New-Item.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ New-Item -Path "c:\" -Name "logfiles" -ItemType "directory"
9595

9696
### Example 3: Create a profile
9797

98-
This command creates a PowerShell profile in the path that is specified by the `$profile` variable.
98+
This command creates a PowerShell profile in the path that is specified by the `$PROFILE` variable.
9999

100-
You can use profiles to customize PowerShell. `$profile` is an automatic (built-in) variable that
100+
You can use profiles to customize PowerShell. `$PROFILE` is an automatic (built-in) variable that
101101
stores the path and file name of the "CurrentUser/CurrentHost" profile. By default, the profile does
102102
not exist, even though PowerShell stores a path and file name for it.
103103

104-
In this command, the `$profile` variable represents the path of the file. **ItemType** parameter
104+
In this command, the `$PROFILE` variable represents the path of the file. **ItemType** parameter
105105
specifies that the command creates a file. The **Force** parameter lets you create a file in the
106106
profile path, even when the directories in the path do not exist.
107107

@@ -112,7 +112,7 @@ For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Co
112112
and [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
113113

114114
```powershell
115-
New-Item -Path $profile -ItemType "file" -Force
115+
New-Item -Path $PROFILE -ItemType "file" -Force
116116
```
117117

118118
> [!NOTE]

reference/5.1/Microsoft.PowerShell.Management/Pop-Location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ If you make a named location stack the current location stack, you can no longer
199199
`Push-Location` or `Pop-Location` cmdlets to add or get items from the default stack or use the
200200
`Get-Location` cmdlet to display the locations in the unnamed stack. To make the unnamed stack
201201
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of
202-
`$Null` or an empty string (`""`).
202+
`$null` or an empty string (`""`).
203203

204204
`Pop-Location` is designed to work with the data exposed by any provider. To list the
205205
providers available in your session, type `Get-PSProvider`. For more information, see

reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Set-ItemProperty -LiteralPath <string[]> -InputObject <psobject> [-PassThru] [-F
8484
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item.
8585
You can use the cmdlet to establish or change the properties of items.
8686
For example, you can use `Set-ItemProperty` to set the value of the **IsReadOnly** property of a
87-
file object to `$True`.
87+
file object to `$true`.
8888

8989
You also use `Set-ItemProperty` to create and change registry values and data.
9090
For example, you can add a new registry entry to a key and establish or change its value.
@@ -170,7 +170,7 @@ Th example uses `Get-ChildItem` to get the `weekly.txt` file. The file object is
170170
specify the property and its new value.
171171

172172
```powershell
173-
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True
173+
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $true
174174
```
175175

176176
## PARAMETERS

0 commit comments

Comments
 (0)