diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md index 95f7e31f7be5..815031bf091e 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md @@ -79,7 +79,7 @@ they have the read-only attribute. ```powershell Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $Profile -Value (Get-Content alias.ps1) +Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) $S = New-PSSession -ComputerName Server01 Invoke-Command -Session $S -FilePath .\alias.ps1 ``` @@ -91,7 +91,7 @@ parameter with a value of Script to generate a file that contains a Set-Alias co alias. The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. -The path to the profile is saved in the `$Profile` variable. The command uses the `Get-Content` +The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md index 1ba50aa4485c..c355fc75b2c6 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -84,9 +84,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > array. This provides some obfuscation but does not provide encryption. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md index cd465a6ad572..67c8f582cad3 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md @@ -48,7 +48,7 @@ default output cmdlet for display. These commands display information about the PS1XML files in the PowerShell directory as a list. ```powershell -$A = Get-ChildItem $pshome\*.ps1xml +$A = Get-ChildItem $PSHOME\*.ps1xml Format-List -InputObject $A ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Culture.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Culture.md index 1f0d8e00b742..8054284325b7 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Culture.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Culture.md @@ -161,8 +161,8 @@ This cmdlet returns a **CultureInfo** object representing the current culture. ## NOTES -You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the -name of the current culture and the `$PsUICulture` variable stores the name of the current UI +You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the +name of the current culture and the `$PSUICulture` variable stores the name of the current UI culture. ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md index bd90882222d4..f8c68c62ee17 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md @@ -111,7 +111,7 @@ Id Name State HasMoreData Location Command ``` ```powershell -$Timer.Enabled = $True +$Timer.Enabled = $true $Subscriber = Get-EventSubscriber -SourceIdentifier Timer.Random ($Subscriber.action).gettype().fullname ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Member.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Member.md index cef8b0a89d5e..3c30a57d5c08 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Member.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Member.md @@ -502,9 +502,9 @@ Windows PowerShell includes the following aliases for `Get-Member`: You can get information about a collection object either using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`. -You can use the `$This` automatic variable in script blocks that define the values of new properties -and methods. The `$This` variable refers to the instance of the object to which the properties and -methods are being added. For more information about the `$This` variable, see +You can use the `$this` automatic variable in script blocks that define the values of new properties +and methods. The `$this` variable refers to the instance of the object to which the properties and +methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). If you pass an object representing a _type_, like a type literal such as `[int]`, `Get-Member` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md index 679629f27282..722c403484bd 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -74,9 +74,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > such as macOS and Linux, credentials are exported in plain text. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md index 636a5154365d..db7094f74785 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -55,7 +55,7 @@ Import-LocalizedData -BindingVariable "Messages" ``` If the command is included in the Archives.ps1 script in the `C:\Test` directory, and the value of -the `$PsUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` +the `$PSUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` file in the `C:\test\zh-CN` directory into the `$Messages` variable. ### Example 2: Import localized data strings @@ -160,13 +160,13 @@ command that converts the contents of the DATA section to a hashtable and stores The script also includes an `Import-LocalizedData` command, which imports a hashtable of translated text strings from the TestScript.psd1 file in the subdirectory specified by the value of the -`$PsUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from +`$PSUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from the file in the value of the same `$UserMessages` variable, overwriting the hashtable saved by the DATA section logic. The third command displays the first message in the `$UserMessages` variable. -If the `Import-LocalizedData` command finds a `.psd1` file for the `$PsUICulture` language, the +If the `Import-LocalizedData` command finds a `.psd1` file for the `$PSUICulture` language, the value of the `$UserMessages` variable contains the translated text strings. If the command fails for any reason, the command displays the default text strings defined in the DATA section of the script. @@ -301,14 +301,14 @@ Accept wildcard characters: False ### -UICulture -Specifies an alternate UI culture. The default is the value of the `$PsUICulture` automatic +Specifies an alternate UI culture. The default is the value of the `$PSUICulture` automatic variable. Enter a UI culture in `-` format, such as `en-US`, `de-DE`, or `ar-SA`. The value of the **UICulture** parameter determines the language-specific subdirectory (within the base directory) from which `Import-LocalizedData` gets the `.psd1` file for the script. The cmdlet searches for a subdirectory with the same name as the value of the **UICulture** -parameter or the `$PsUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the +parameter or the `$PSUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the directory, or the directory doesn't contain a `.psd1` file for the script, it searches for a subdirectory with the name of the language code, such as de or ar. If it can't find the subdirectory or `.psd1` file, the command fails and the data is displayed in the default language specified in @@ -363,7 +363,7 @@ parameter. `Import-LocalizedData` begins the search in the directory where the script file is located (or the value of the **BaseDirectory** parameter). It then searches within the base directory for a - subdirectory with the same name as the value of the `$PsUICulture` variable (or the value of the + subdirectory with the same name as the value of the `$PSUICulture` variable (or the value of the **UICulture** parameter), such as `de-DE` or `ar-SA`. Then, it searches in that subdirectory for a `.psd1` file with the same name as the script (or the value of the **FileName** parameter). diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md index 06f84398aa89..6f113ff160a9 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md @@ -145,12 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String -You can pipe a string representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe a string representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ### System.Management.Automation.PSObject -You can pipe an object representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe an object representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ## OUTPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md b/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md index 18ed8b144f92..4eed27422f6d 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md @@ -56,16 +56,16 @@ Major Minor Build Revision This example creates two instances of the COM object that represents the Internet Explorer application. The first instance uses the **Property** parameter hash table to call the **Navigate2** -method and set the **Visible** property of the object to `$True` to make the application visible. +method and set the **Visible** property of the object to `$true` to make the application visible. The second instance gets the same results with individual commands. ```powershell -$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $True} +$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $true} # The following command gets the same results as the example above. $IE2 = New-Object -COMObject InternetExplorer.Application` $IE2.Navigate2("www.microsoft.com")` -$IE2.Visible = $True` +$IE2.Visible = $true` ``` ### Example 3: Use the Strict parameter to generate a non-terminating error @@ -74,7 +74,7 @@ This example demonstrates that adding the **Strict** parameter causes the `New-O generate a non-terminating error when the COM object uses an interop assembly. ```powershell -$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $True} +$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $true} ``` ```Output diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md index 9e8248bf084a..c347eabfdd91 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md @@ -79,7 +79,7 @@ they have the read-only attribute. ```powershell Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $Profile -Value (Get-Content alias.ps1) +Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) $S = New-PSSession -ComputerName Server01 Invoke-Command -Session $S -FilePath .\alias.ps1 ``` @@ -91,7 +91,7 @@ parameter with a value of Script to generate a file that contains a Set-Alias co alias. The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. -The path to the profile is saved in the `$Profile` variable. The command uses the `Get-Content` +The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md index bf32274af59b..531d8d496cdd 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -84,9 +84,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > array. This provides some obfuscation but does not provide encryption. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md index 732ab5645998..06f6c0be5fa4 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md @@ -48,7 +48,7 @@ default output cmdlet for display. These commands display information about the PS1XML files in the PowerShell directory as a list. ```powershell -$A = Get-ChildItem $pshome\*.ps1xml +$A = Get-ChildItem $PSHOME\*.ps1xml Format-List -InputObject $A ``` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Culture.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Culture.md index d8672e674633..9eebb66c986e 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Culture.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Culture.md @@ -243,8 +243,8 @@ This cmdlet returns a **CultureInfo** object representing the current culture. ## NOTES -You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the -name of the current culture and the `$PsUICulture` variable stores the name of the current UI +You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the +name of the current culture and the `$PSUICulture` variable stores the name of the current UI culture. ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-EventSubscriber.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-EventSubscriber.md index 092d0cb91163..90ba4e121230 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-EventSubscriber.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-EventSubscriber.md @@ -111,7 +111,7 @@ Id Name State HasMoreData Location Command ``` ```powershell -$Timer.Enabled = $True +$Timer.Enabled = $true $Subscriber = Get-EventSubscriber -SourceIdentifier Timer.Random ($Subscriber.action).gettype().fullname ``` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Member.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Member.md index a9018165e107..2e765a07ec68 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Member.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Member.md @@ -507,9 +507,9 @@ PowerShell includes the following aliases for `Get-Member`: You can get information about a collection object either using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`. -You can use the `$This` automatic variable in script blocks that define the values of new properties -and methods. The `$This` variable refers to the instance of the object to which the properties and -methods are being added. For more information about the `$This` variable, see +You can use the `$this` automatic variable in script blocks that define the values of new properties +and methods. The `$this` variable refers to the instance of the object to which the properties and +methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). If you pass an object representing a _type_, like a type literal such as `[int]`, `Get-Member` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md index 06fb6155fa84..bac85f0cede5 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -74,9 +74,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > such as macOS and Linux, credentials are exported in plain text. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md index 021d28cc9fd5..d356a644fa39 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -55,7 +55,7 @@ Import-LocalizedData -BindingVariable "Messages" ``` If the command is included in the Archives.ps1 script in the `C:\Test` directory, and the value of -the `$PsUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` +the `$PSUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` file in the `C:\test\zh-CN` directory into the `$Messages` variable. ### Example 2: Import localized data strings @@ -160,13 +160,13 @@ command that converts the contents of the DATA section to a hashtable and stores The script also includes an `Import-LocalizedData` command, which imports a hashtable of translated text strings from the TestScript.psd1 file in the subdirectory specified by the value of the -`$PsUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from +`$PSUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from the file in the value of the same `$UserMessages` variable, overwriting the hashtable saved by the DATA section logic. The third command displays the first message in the `$UserMessages` variable. -If the `Import-LocalizedData` command finds a `.psd1` file for the `$PsUICulture` language, the +If the `Import-LocalizedData` command finds a `.psd1` file for the `$PSUICulture` language, the value of the `$UserMessages` variable contains the translated text strings. If the command fails for any reason, the command displays the default text strings defined in the DATA section of the script. @@ -301,14 +301,14 @@ Accept wildcard characters: False ### -UICulture -Specifies an alternate UI culture. The default is the value of the `$PsUICulture` automatic +Specifies an alternate UI culture. The default is the value of the `$PSUICulture` automatic variable. Enter a UI culture in `-` format, such as `en-US`, `de-DE`, or `ar-SA`. The value of the **UICulture** parameter determines the language-specific subdirectory (within the base directory) from which `Import-LocalizedData` gets the `.psd1` file for the script. The cmdlet searches for a subdirectory with the same name as the value of the **UICulture** -parameter or the `$PsUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the +parameter or the `$PSUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the directory, or the directory doesn't contain a `.psd1` file for the script, it searches for a subdirectory with the name of the language code, such as de or ar. If it can't find the subdirectory or `.psd1` file, the command fails and the data is displayed in the default language specified in @@ -363,7 +363,7 @@ parameter. `Import-LocalizedData` begins the search in the directory where the script file is located (or the value of the **BaseDirectory** parameter). It then searches within the base directory for a - subdirectory with the same name as the value of the `$PsUICulture` variable (or the value of the + subdirectory with the same name as the value of the `$PSUICulture` variable (or the value of the **UICulture** parameter), such as `de-DE` or `ar-SA`. Then, it searches in that subdirectory for a `.psd1` file with the same name as the script (or the value of the **FileName** parameter). diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-Expression.md b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-Expression.md index c3e26e2d8109..e599d0664a26 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-Expression.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-Expression.md @@ -145,12 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String -You can pipe a string representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe a string representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ### System.Management.Automation.PSObject -You can pipe an object representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe an object representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ## OUTPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md index ef6ee0ece399..79e682841ee4 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md @@ -56,16 +56,16 @@ Major Minor Build Revision This example creates two instances of the COM object that represents the Internet Explorer application. The first instance uses the **Property** parameter hash table to call the **Navigate2** -method and set the **Visible** property of the object to `$True` to make the application visible. +method and set the **Visible** property of the object to `$true` to make the application visible. The second instance gets the same results with individual commands. ```powershell -$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $True} +$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $true} # The following command gets the same results as the example above. $IE2 = New-Object -COMObject InternetExplorer.Application` $IE2.Navigate2("www.microsoft.com")` -$IE2.Visible = $True` +$IE2.Visible = $true` ``` ### Example 3: Use the Strict parameter to generate a non-terminating error @@ -74,7 +74,7 @@ This example demonstrates that adding the **Strict** parameter causes the `New-O generate a non-terminating error when the COM object uses an interop assembly. ```powershell -$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $True} +$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $true} ``` ```Output diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md index e8ed896bc665..a868d8ecdd92 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md @@ -79,7 +79,7 @@ they have the read-only attribute. ```powershell Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $Profile -Value (Get-Content alias.ps1) +Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) $S = New-PSSession -ComputerName Server01 Invoke-Command -Session $S -FilePath .\alias.ps1 ``` @@ -91,7 +91,7 @@ parameter with a value of Script to generate a file that contains a Set-Alias co alias. The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. -The path to the profile is saved in the `$Profile` variable. The command uses the `Get-Content` +The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md index f534f14dc561..c45f7548e1d3 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -84,9 +84,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > array. This provides some obfuscation but does not provide encryption. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md index da1fff2ae34c..c4a4bfc0fcfb 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md @@ -49,7 +49,7 @@ default output cmdlet for display. These commands display information about the PS1XML files in the PowerShell directory as a list. ```powershell -$A = Get-ChildItem $pshome\*.ps1xml +$A = Get-ChildItem $PSHOME\*.ps1xml Format-List -InputObject $A ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md index badb993c9411..b84646f23699 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md @@ -243,8 +243,8 @@ This cmdlet returns a **CultureInfo** object representing the current culture. ## NOTES -You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the -name of the current culture and the `$PsUICulture` variable stores the name of the current UI +You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the +name of the current culture and the `$PSUICulture` variable stores the name of the current UI culture. ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md index 59f3807fe7c5..d0f05c000e70 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md @@ -116,7 +116,7 @@ Id Name State HasMoreData Location Command ``` ```powershell -$Timer.Enabled = $True +$Timer.Enabled = $true $Subscriber = Get-EventSubscriber -SourceIdentifier Timer.Random ($Subscriber.Action).GetType().FullName ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Member.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Member.md index 9fa44403f7b5..1664955a20a6 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Member.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Member.md @@ -507,9 +507,9 @@ PowerShell includes the following aliases for `Get-Member`: You can get information about a collection object either using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`. -You can use the `$This` automatic variable in script blocks that define the values of new properties -and methods. The `$This` variable refers to the instance of the object to which the properties and -methods are being added. For more information about the `$This` variable, see +You can use the `$this` automatic variable in script blocks that define the values of new properties +and methods. The `$this` variable refers to the instance of the object to which the properties and +methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). If you pass an object representing a _type_, like a type literal such as `[int]`, `Get-Member` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md index 4308f44b1280..a8cbb2aeb0a9 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -74,9 +74,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > such as macOS and Linux, credentials are exported in plain text. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md index 201607cb6303..e5cbfb6b82c5 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -55,7 +55,7 @@ Import-LocalizedData -BindingVariable "Messages" ``` If the command is included in the Archives.ps1 script in the `C:\Test` directory, and the value of -the `$PsUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` +the `$PSUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` file in the `C:\test\zh-CN` directory into the `$Messages` variable. ### Example 2: Import localized data strings @@ -160,13 +160,13 @@ command that converts the contents of the DATA section to a hashtable and stores The script also includes an `Import-LocalizedData` command, which imports a hashtable of translated text strings from the TestScript.psd1 file in the subdirectory specified by the value of the -`$PsUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from +`$PSUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from the file in the value of the same `$UserMessages` variable, overwriting the hashtable saved by the DATA section logic. The third command displays the first message in the `$UserMessages` variable. -If the `Import-LocalizedData` command finds a `.psd1` file for the `$PsUICulture` language, the +If the `Import-LocalizedData` command finds a `.psd1` file for the `$PSUICulture` language, the value of the `$UserMessages` variable contains the translated text strings. If the command fails for any reason, the command displays the default text strings defined in the DATA section of the script. @@ -301,14 +301,14 @@ Accept wildcard characters: False ### -UICulture -Specifies an alternate UI culture. The default is the value of the `$PsUICulture` automatic +Specifies an alternate UI culture. The default is the value of the `$PSUICulture` automatic variable. Enter a UI culture in `-` format, such as `en-US`, `de-DE`, or `ar-SA`. The value of the **UICulture** parameter determines the language-specific subdirectory (within the base directory) from which `Import-LocalizedData` gets the `.psd1` file for the script. The cmdlet searches for a subdirectory with the same name as the value of the **UICulture** -parameter or the `$PsUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the +parameter or the `$PSUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the directory, or the directory doesn't contain a `.psd1` file for the script, it searches for a subdirectory with the name of the language code, such as de or ar. If it can't find the subdirectory or `.psd1` file, the command fails and the data is displayed in the default language specified in @@ -363,7 +363,7 @@ parameter. `Import-LocalizedData` begins the search in the directory where the script file is located (or the value of the **BaseDirectory** parameter). It then searches within the base directory for a - subdirectory with the same name as the value of the `$PsUICulture` variable (or the value of the + subdirectory with the same name as the value of the `$PSUICulture` variable (or the value of the **UICulture** parameter), such as `de-DE` or `ar-SA`. Then, it searches in that subdirectory for a `.psd1` file with the same name as the script (or the value of the **FileName** parameter). diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-Expression.md b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-Expression.md index 8ccd687cbabd..ea9bb76502d0 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-Expression.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-Expression.md @@ -145,12 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String -You can pipe a string representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe a string representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ### System.Management.Automation.PSObject -You can pipe an object representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe an object representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ## OUTPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md index cf8237de80c5..38257bf98c00 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md @@ -56,16 +56,16 @@ Major Minor Build Revision This example creates two instances of the COM object that represents the Internet Explorer application. The first instance uses the **Property** parameter hash table to call the **Navigate2** -method and set the **Visible** property of the object to `$True` to make the application visible. +method and set the **Visible** property of the object to `$true` to make the application visible. The second instance gets the same results with individual commands. ```powershell -$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $True} +$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $true} # The following command gets the same results as the example above. $IE2 = New-Object -COMObject InternetExplorer.Application` $IE2.Navigate2("www.microsoft.com")` -$IE2.Visible = $True` +$IE2.Visible = $true` ``` ### Example 3: Use the Strict parameter to generate a non-terminating error @@ -74,7 +74,7 @@ This example demonstrates that adding the **Strict** parameter causes the `New-O generate a non-terminating error when the COM object uses an interop assembly. ```powershell -$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $True} +$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $true} ``` ```Output diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md index a2fb1a61a0cc..d8781b98e581 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md @@ -79,7 +79,7 @@ they have the read-only attribute. ```powershell Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $Profile -Value (Get-Content alias.ps1) +Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) $S = New-PSSession -ComputerName Server01 Invoke-Command -Session $S -FilePath .\alias.ps1 ``` @@ -91,7 +91,7 @@ parameter with a value of Script to generate a file that contains a Set-Alias co alias. The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. -The path to the profile is saved in the `$Profile` variable. The command uses the `Get-Content` +The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md index c7221e6c081d..60f9dc3e51c3 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -84,9 +84,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > array. This provides some obfuscation but does not provide encryption. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Format-List.md b/reference/7.6/Microsoft.PowerShell.Utility/Format-List.md index 4a7f4fa93798..666e4fbde956 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Format-List.md @@ -48,7 +48,7 @@ default output cmdlet for display. These commands display information about the PS1XML files in the PowerShell directory as a list. ```powershell -$A = Get-ChildItem $pshome\*.ps1xml +$A = Get-ChildItem $PSHOME\*.ps1xml Format-List -InputObject $A ``` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Culture.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Culture.md index 0f03e7d9c1fa..1f8c5b00bf59 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Culture.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Culture.md @@ -243,8 +243,8 @@ This cmdlet returns a **CultureInfo** object representing the current culture. ## NOTES -You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the -name of the current culture and the `$PsUICulture` variable stores the name of the current UI +You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the +name of the current culture and the `$PSUICulture` variable stores the name of the current UI culture. ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-EventSubscriber.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-EventSubscriber.md index f0d259743643..f2eac9450c02 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-EventSubscriber.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-EventSubscriber.md @@ -111,7 +111,7 @@ Id Name State HasMoreData Location Command ``` ```powershell -$Timer.Enabled = $True +$Timer.Enabled = $true $Subscriber = Get-EventSubscriber -SourceIdentifier Timer.Random ($Subscriber.action).GetType().fullname ``` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Member.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Member.md index bd5f436ee015..d44770c15155 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Member.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Member.md @@ -507,9 +507,9 @@ PowerShell includes the following aliases for `Get-Member`: You can get information about a collection object either using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`. -You can use the `$This` automatic variable in script blocks that define the values of new properties -and methods. The `$This` variable refers to the instance of the object to which the properties and -methods are being added. For more information about the `$This` variable, see +You can use the `$this` automatic variable in script blocks that define the values of new properties +and methods. The `$this` variable refers to the instance of the object to which the properties and +methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). If you pass an object representing a _type_, like a type literal such as `[int]`, `Get-Member` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md index 20e7cf228172..9fbb5e89fd00 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -74,9 +74,9 @@ In this example, given a credential that you've stored in the `$Credential` vari > such as macOS and Linux, credentials are exported in plain text. ```powershell -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential | Export-Clixml $Credxmlpath -$Credxmlpath = Join-Path (Split-Path $Profile) TestScript.ps1.credential +$Credxmlpath = Join-Path (Split-Path $PROFILE) TestScript.ps1.credential $Credential = Import-Clixml $Credxmlpath ``` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md index d21b6e4cdf82..20760db630d7 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -55,7 +55,7 @@ Import-LocalizedData -BindingVariable "Messages" ``` If the command is included in the Archives.ps1 script in the `C:\Test` directory, and the value of -the `$PsUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` +the `$PSUICulture` automatic variable is zh-CN, `Import-LocalizedData` imports the `Archives.psd1` file in the `C:\test\zh-CN` directory into the `$Messages` variable. ### Example 2: Import localized data strings @@ -160,13 +160,13 @@ command that converts the contents of the DATA section to a hashtable and stores The script also includes an `Import-LocalizedData` command, which imports a hashtable of translated text strings from the TestScript.psd1 file in the subdirectory specified by the value of the -`$PsUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from +`$PSUICulture` variable. If the command finds the `.psd1` file, it saves the translated strings from the file in the value of the same `$UserMessages` variable, overwriting the hashtable saved by the DATA section logic. The third command displays the first message in the `$UserMessages` variable. -If the `Import-LocalizedData` command finds a `.psd1` file for the `$PsUICulture` language, the +If the `Import-LocalizedData` command finds a `.psd1` file for the `$PSUICulture` language, the value of the `$UserMessages` variable contains the translated text strings. If the command fails for any reason, the command displays the default text strings defined in the DATA section of the script. @@ -301,14 +301,14 @@ Accept wildcard characters: False ### -UICulture -Specifies an alternate UI culture. The default is the value of the `$PsUICulture` automatic +Specifies an alternate UI culture. The default is the value of the `$PSUICulture` automatic variable. Enter a UI culture in `-` format, such as `en-US`, `de-DE`, or `ar-SA`. The value of the **UICulture** parameter determines the language-specific subdirectory (within the base directory) from which `Import-LocalizedData` gets the `.psd1` file for the script. The cmdlet searches for a subdirectory with the same name as the value of the **UICulture** -parameter or the `$PsUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the +parameter or the `$PSUICulture` automatic variable, such as `de-DE` or `ar-SA`. If it can't find the directory, or the directory doesn't contain a `.psd1` file for the script, it searches for a subdirectory with the name of the language code, such as de or ar. If it can't find the subdirectory or `.psd1` file, the command fails and the data is displayed in the default language specified in @@ -363,7 +363,7 @@ parameter. `Import-LocalizedData` begins the search in the directory where the script file is located (or the value of the **BaseDirectory** parameter). It then searches within the base directory for a - subdirectory with the same name as the value of the `$PsUICulture` variable (or the value of the + subdirectory with the same name as the value of the `$PSUICulture` variable (or the value of the **UICulture** parameter), such as `de-DE` or `ar-SA`. Then, it searches in that subdirectory for a `.psd1` file with the same name as the script (or the value of the **FileName** parameter). diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-Expression.md b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-Expression.md index adc991f2efd2..26e43383f97c 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-Expression.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-Expression.md @@ -145,12 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String -You can pipe a string representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe a string representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ### System.Management.Automation.PSObject -You can pipe an object representing the expression to invoke to this cmdlet. Use the `$Input` +You can pipe an object representing the expression to invoke to this cmdlet. Use the `$input` automatic variable to represent the input objects in the command. ## OUTPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md index 1d815c6ee266..2a5fdb56d4a6 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md @@ -56,16 +56,16 @@ Major Minor Build Revision This example creates two instances of the COM object that represents the Internet Explorer application. The first instance uses the **Property** parameter hash table to call the **Navigate2** -method and set the **Visible** property of the object to `$True` to make the application visible. +method and set the **Visible** property of the object to `$true` to make the application visible. The second instance gets the same results with individual commands. ```powershell -$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $True} +$IE1 = New-Object -COMObject InternetExplorer.Application -Property @{Navigate2="www.microsoft.com"; Visible = $true} # The following command gets the same results as the example above. $IE2 = New-Object -COMObject InternetExplorer.Application` $IE2.Navigate2("www.microsoft.com")` -$IE2.Visible = $True` +$IE2.Visible = $true` ``` ### Example 3: Use the Strict parameter to generate a non-terminating error @@ -74,7 +74,7 @@ This example demonstrates that adding the **Strict** parameter causes the `New-O generate a non-terminating error when the COM object uses an interop assembly. ```powershell -$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $True} +$A = New-Object -COMObject Word.Application -Strict -Property @{Visible = $true} ``` ```Output