From 0cb69930a199f7c9baf8fe3661957eb8e63248a5 Mon Sep 17 00:00:00 2001 From: surfingoldelephant <151538956+surfingoldelephant@users.noreply.github.com> Date: Sun, 23 Mar 2025 14:36:49 +0000 Subject: [PATCH] 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). --- .../About/about_Hidden.md | 28 +++++++++---------- .../About/about_If.md | 4 +-- .../About/about_Intrinsic_Members.md | 2 +- .../About/about_Job_Details.md | 2 +- .../About/about_Jobs.md | 6 ++-- .../About/about_Join.md | 6 ++-- .../About/about_Language_Keywords.md | 20 ++++++------- .../About/about_Language_Modes.md | 2 +- .../About/about_Logical_Operators.md | 6 ++-- .../About/about_Member-Access_Enumeration.md | 4 +-- .../About/about_Hidden.md | 28 +++++++++---------- .../About/about_If.md | 4 +-- .../About/about_Intrinsic_Members.md | 2 +- .../About/about_Job_Details.md | 2 +- .../About/about_Jobs.md | 6 ++-- .../About/about_Join.md | 6 ++-- .../About/about_Language_Keywords.md | 18 ++++++------ .../About/about_Language_Modes.md | 2 +- .../About/about_Logical_Operators.md | 6 ++-- .../About/about_Member-Access_Enumeration.md | 4 +-- .../About/about_Hidden.md | 28 +++++++++---------- .../About/about_If.md | 4 +-- .../About/about_Intrinsic_Members.md | 2 +- .../About/about_Job_Details.md | 2 +- .../About/about_Jobs.md | 6 ++-- .../About/about_Join.md | 6 ++-- .../About/about_Language_Keywords.md | 18 ++++++------ .../About/about_Language_Modes.md | 2 +- .../About/about_Logical_Operators.md | 6 ++-- .../About/about_Member-Access_Enumeration.md | 4 +-- .../About/about_Hidden.md | 28 +++++++++---------- .../About/about_If.md | 4 +-- .../About/about_Intrinsic_Members.md | 2 +- .../About/about_Job_Details.md | 2 +- .../About/about_Jobs.md | 6 ++-- .../About/about_Join.md | 6 ++-- .../About/about_Language_Keywords.md | 18 ++++++------ .../About/about_Language_Modes.md | 2 +- .../About/about_Logical_Operators.md | 6 ++-- .../About/about_Member-Access_Enumeration.md | 4 +-- 40 files changed, 157 insertions(+), 157 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Hidden.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Hidden.md index 8fb72080ce18..a1f30b02c665 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Hidden.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Hidden.md @@ -48,7 +48,7 @@ PowerShell 5.0. ## EXAMPLE The following example shows how to use the `hidden` keyword in a class -definition. The **Car** class method, **Drive**, has a property, **rides**, +definition. The **Car** class method, **Drive**, has a property, **Rides**, that does not need to be viewed or changed as it merely tallies the number of times that **Drive** is called on the **Car** class. That metric that is not important to users of the class (consider, for example, that when you are @@ -68,20 +68,20 @@ later to identify all members that you have hidden. class Car { # Properties - [String] $Color - [String] $ModelYear + [string] $Color + [string] $ModelYear [int] $Distance # Method - [int] Drive ([int]$miles) + [int] Drive ([int]$Miles) { - $this.Distance += $miles - $this.rides++ + $this.Distance += $Miles + $this.Rides++ return $this.Distance } # Hidden property of the Drive method - hidden [int] $rides = 0 + hidden [int] $Rides = 0 } ``` @@ -93,7 +93,7 @@ $TestCar = [Car]::new() ``` After you create the new instance, pipe the contents of the `$TestCar` variable -to `Get-Member`. Observe that the **rides** property is not among the members +to `Get-Member`. Observe that the **Rides** property is not among the members listed in the `Get-Member` command results. ```output @@ -103,7 +103,7 @@ PS C:\Windows\system32> $TestCar | Get-Member Name MemberType Definition ---- ---------- ---------- -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() @@ -115,7 +115,7 @@ ModelYear Property string ModelYear {get;set;} ``` Now, try running `Get-Member` again, but this time, add the `-Force` parameter. -Note that the results contain the hidden **rides** property, among other +Note that the results contain the hidden **Rides** property, among other members that are hidden by default. ```output @@ -130,23 +130,23 @@ psadapted MemberSet psadapted {Color, ModelYear, Distance, psbase MemberSet psbase {Color, ModelYear, Distance,... psextended MemberSet psextended {} psobject MemberSet psobject {BaseObject, Members,... -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() get_Color Method string get_Color() get_Distance Method int get_Distance() get_ModelYear Method string get_ModelYear() -get_rides Method int get_rides() +get_Rides Method int get_Rides() set_Color Method void set_Color(string ) set_Distance Method void set_Distance(int ) set_ModelYear Method void set_ModelYear(string ) -set_rides Method void set_rides(int ) +set_Rides Method void set_Rides(int ) ToString Method string ToString() Color Property string Color {get;set;} Distance Property int Distance {get;set;} ModelYear Property string ModelYear {get;set;} -rides Property int rides {get;set;} +Rides Property int Rides {get;set;} ``` diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_If.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_If.md index 88f9e0eefb85..169a37d65e21 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_If.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_If.md @@ -48,7 +48,7 @@ statement. If both `` and `` evaluate to false, the You can use multiple `elseif` statements to chain a series of conditional tests. Each test is run only if all the previous tests are false. If you need to create an `if` statement that contains many `elseif` statements, consider -using a Switch statement instead. +using a `switch` statement instead. Examples: @@ -67,7 +67,7 @@ evaluates to true, and the statement list runs. However, if `$a` is less than or equal to `2` or isn't an existing variable, the `if` statement doesn't display a message. -By adding an Else statement, a message is displayed when $a is less than or +By adding an `else` statement, a message is displayed when $a is less than or equal to 2. As the next example shows: ```powershell diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md index 41bea085e39a..ea60f7a254cf 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md @@ -211,7 +211,7 @@ For more information, see [about_Operators][03]. ## New() method for types -Beginning in PowerShell 5.0, PowerShell adds a static `New()` method for all +Beginning in PowerShell 5.0, PowerShell adds a static `new()` method for all .NET types. The following examples produce the same result. ```powershell diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Job_Details.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Job_Details.md index f218931b93b8..d572715b47d4 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Job_Details.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Job_Details.md @@ -84,7 +84,7 @@ other cmdlets might work differently. The child jobs are stored in the **ChildJobs** property of the parent job object. The **ChildJobs** property can contain one or many child job objects. -The child job objects have a **Name**, **ID**, and **InstanceId** that differ +The child job objects have a **Name**, **Id**, and **InstanceId** that differ from the parent job so that you can manage the parent and child jobs individually or as a unit. diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Jobs.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Jobs.md index b4ae7e21c28f..f3d34cb32cc4 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Jobs.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Jobs.md @@ -248,11 +248,11 @@ is completed and all results are available. You can also use the `Wait-Job` cmdlet to wait for any or all of the results of the job. `Wait-Job` lets you wait for one or more specific job or for all jobs. -The following command uses the `Wait-Job` cmdlet to wait for a job with **ID** +The following command uses the `Wait-Job` cmdlet to wait for a job with **Id** 10. ```powershell -Wait-Job -ID 10 +Wait-Job -Id 10 ``` As a result, the PowerShell prompt is suppressed until the job is completed. @@ -262,7 +262,7 @@ You can also wait for a predetermined period of time. This command uses the the command prompt returns, but the job continues to run in the background. ```powershell -Wait-Job -ID 10 -Timeout 120 +Wait-Job -Id 10 -Timeout 120 ``` ## Stopping a job diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Join.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Join.md index 254e54b874c9..68d45698d6e6 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Join.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Join.md @@ -1,5 +1,5 @@ --- -description: Describes how the join operator (-join) combines multiple strings into a single string. +description: Describes how the join operator (`-join`) combines multiple strings into a single string. Locale: en-US ms.date: 06/09/2017 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_join?view=powershell-5.1&WT.mc_id=ps-gethelp @@ -11,7 +11,7 @@ title: about_Join ## Short description -Describes how the join operator (-join) combines multiple strings into a +Describes how the join operator (`-join`) combines multiple strings into a single string. ## Long description @@ -38,7 +38,7 @@ concatenated strings. The default is no delimiter (""). Remarks -The unary join operator (-join ) has higher precedence than a +The unary join operator (`-join `) has higher precedence than a comma. As a result, if you submit a comma-separated list of strings to the unary join operator, only the first string (before the first comma) is submitted to the join operator. diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md index 7bb2ed962e2c..77e4a8bf9fec 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md @@ -35,12 +35,12 @@ about topic for the keyword and the information that follows the table. | `filter` | [about_Functions][18] | | `finally` | [about_Try_Catch_Finally][26] | | `for` | [about_For][13] | -| `foreach` | [about_ForEach][14] | +| `foreach` | [about_Foreach][14] | | `from` | Reserved for future use | | `function` | [about_Functions][18], [about_Functions_Advanced][17] | | `hidden` | [about_Hidden][19] | | `if` | [about_If][20] | -| `in` | [about_ForEach][14] | +| `in` | [about_Foreach][14] | | `param` | [about_Functions][18] | | `process` | [about_Functions][18], [about_Functions_Advanced][17] | | `return` | [about_Return][21] | @@ -155,7 +155,7 @@ also include `if` statements and some limited commands. Syntax: ```Syntax -data [-supportedCommand ] {} +data [-SupportedCommand ] {} ``` ## `do` @@ -281,7 +281,7 @@ C:\scripts\test>type test.ps1 3 exit 4 -C:\scripts\test>powershell -file ./test.ps1 +C:\scripts\test>powershell -File ./test.ps1 1 2 3 @@ -358,7 +358,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1> [, [type]<$pname2>]) + param ([type]<$PName1> [, [type]<$PName2>]) dynamicparam {} begin {} process {} @@ -372,7 +372,7 @@ statement list after the function name. Syntax: ```Syntax -function [] [([type]<$pname1>, [[type]<$pname2>])] { +function [] [([type]<$PName1>, [[type]<$PName2>])] { dynamicparam {} begin {} process {} @@ -420,7 +420,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1>[, [[type]<$pname2>]]) + param ([type]<$PName1>[, [[type]<$PName2>]]) } ``` @@ -554,7 +554,7 @@ include classes from modules. Namespace syntax: ```Syntax -using namespace <.Net-framework-namespace> +using namespace <.NET-Framework-namespace> ``` Module syntax: @@ -567,7 +567,7 @@ Assembly syntax: ```Syntax using assembly <.NET-assembly-path> -using assembly <.NET-framework-namespace> +using assembly <.NET-Framework-namespace> ``` For more information, see [about_Using][27]. @@ -614,7 +614,7 @@ do {} while () [11]: about_Do.md [12]: about_Enum.md [13]: about_For.md -[14]: about_ForEach.md +[14]: about_Foreach.md [15]: about_Functions_Advanced_Methods.md [16]: about_Functions_Advanced_Parameters.md [17]: about_Functions_Advanced.md diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Modes.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Modes.md index 085755c94d4d..395440d721ea 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Modes.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Modes.md @@ -176,7 +176,7 @@ additional variables: - `$PSScriptRoot` - `$PSEdition` - `$EnabledExperimentalFeatures` -- Any environment variables, like `$ENV:TEMP` +- Any environment variables, like `$Env:TEMP` Only the following comparison operators are permitted: diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md index 30a6ab0f1a6d..ad5479599809 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md @@ -60,8 +60,8 @@ of FALSE. All other integers have a value of TRUE. The syntax of the logical operators is as follows: ```Syntax - {-AND | -OR | -XOR} -{! | -NOT} + {-and | -or | -xor} +{! | -not} ``` Statements that use the logical operators return Boolean (TRUE or FALSE) @@ -72,7 +72,7 @@ determine the truth value of the statement. If the left operand in a statement that contains the and operator is FALSE, the right operand isn't evaluated. If the left operand in a statement that contains the or statement is TRUE, the right operand isn't evaluated. As a result, you can use these statements in -the same way that you would use the `If` statement. +the same way that you would use the `if` statement. ## See also diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md index 4c5f03c4d6fc..59aea5baf7a1 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md @@ -230,7 +230,7 @@ PS> $CapitalizedProperty = @{ Value = { $this.ToUpper() } PassThru = $true } -PS> [System.Collections.Generic.List[object]]$MixedCollection = @( +PS> [System.Collections.Generic.List[Object]]$MixedCollection = @( 'a' ('b' | Add-Member @CapitalizedProperty) ('c' | Add-Member @CapitalizedProperty) @@ -284,7 +284,7 @@ successful method calls isn't returned. Terminating error conditions include: Consider the following example: ```powershell -class Class1 { [object] Foo() { return 'Bar' } } +class Class1 { [Object] Foo() { return 'Bar' } } class Class2 { [void] Foo() { throw 'Error' } } class Class3 {} diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Hidden.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Hidden.md index b14f35fc7d6d..c106c8c412b1 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Hidden.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Hidden.md @@ -48,7 +48,7 @@ PowerShell 5.0. ## EXAMPLE The following example shows how to use the `hidden` keyword in a class -definition. The **Car** class method, **Drive**, has a property, **rides**, +definition. The **Car** class method, **Drive**, has a property, **Rides**, that does not need to be viewed or changed as it merely tallies the number of times that **Drive** is called on the **Car** class. That metric that is not important to users of the class (consider, for example, that when you are @@ -68,20 +68,20 @@ later to identify all members that you have hidden. class Car { # Properties - [String] $Color - [String] $ModelYear + [string] $Color + [string] $ModelYear [int] $Distance # Method - [int] Drive ([int]$miles) + [int] Drive ([int]$Miles) { - $this.Distance += $miles - $this.rides++ + $this.Distance += $Miles + $this.Rides++ return $this.Distance } # Hidden property of the Drive method - hidden [int] $rides = 0 + hidden [int] $Rides = 0 } ``` @@ -93,7 +93,7 @@ $TestCar = [Car]::new() ``` After you create the new instance, pipe the contents of the `$TestCar` variable -to `Get-Member`. Observe that the **rides** property is not among the members +to `Get-Member`. Observe that the **Rides** property is not among the members listed in the `Get-Member` command results. ```output @@ -103,7 +103,7 @@ PS C:\Windows\system32> $TestCar | Get-Member Name MemberType Definition ---- ---------- ---------- -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() @@ -115,7 +115,7 @@ ModelYear Property string ModelYear {get;set;} ``` Now, try running `Get-Member` again, but this time, add the `-Force` parameter. -Note that the results contain the hidden **rides** property, among other +Note that the results contain the hidden **Rides** property, among other members that are hidden by default. ```output @@ -130,23 +130,23 @@ psadapted MemberSet psadapted {Color, ModelYear, Distance, psbase MemberSet psbase {Color, ModelYear, Distance,... psextended MemberSet psextended {} psobject MemberSet psobject {BaseObject, Members,... -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() get_Color Method string get_Color() get_Distance Method int get_Distance() get_ModelYear Method string get_ModelYear() -get_rides Method int get_rides() +get_Rides Method int get_Rides() set_Color Method void set_Color(string ) set_Distance Method void set_Distance(int ) set_ModelYear Method void set_ModelYear(string ) -set_rides Method void set_rides(int ) +set_Rides Method void set_Rides(int ) ToString Method string ToString() Color Property string Color {get;set;} Distance Property int Distance {get;set;} ModelYear Property string ModelYear {get;set;} -rides Property int rides {get;set;} +Rides Property int Rides {get;set;} ``` diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_If.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_If.md index 280fba2d84e6..525a3ca30196 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_If.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_If.md @@ -48,7 +48,7 @@ statement. If both `` and `` evaluate to false, the You can use multiple `elseif` statements to chain a series of conditional tests. Each test is run only if all the previous tests are false. If you need to create an `if` statement that contains many `elseif` statements, consider -using a Switch statement instead. +using a `switch` statement instead. Examples: @@ -67,7 +67,7 @@ evaluates to true, and the statement list runs. However, if `$a` is less than or equal to `2` or isn't an existing variable, the `if` statement doesn't display a message. -By adding an Else statement, a message is displayed when $a is less than or +By adding an `else` statement, a message is displayed when $a is less than or equal to 2. As the next example shows: ```powershell diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md index 246f7695617a..3fcf7af6ae0e 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md @@ -211,7 +211,7 @@ For more information, see [about_Operators][03]. ## New() method for types -Beginning in PowerShell 5.0, PowerShell adds a static `New()` method for all +Beginning in PowerShell 5.0, PowerShell adds a static `new()` method for all .NET types. The following examples produce the same result. ```powershell diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Job_Details.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Job_Details.md index 145bff3783a0..65cb9c53743d 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Job_Details.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Job_Details.md @@ -84,7 +84,7 @@ other cmdlets might work differently. The child jobs are stored in the **ChildJobs** property of the parent job object. The **ChildJobs** property can contain one or many child job objects. -The child job objects have a **Name**, **ID**, and **InstanceId** that differ +The child job objects have a **Name**, **Id**, and **InstanceId** that differ from the parent job so that you can manage the parent and child jobs individually or as a unit. diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Jobs.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Jobs.md index 5fd02b66f95c..acff6c9e5f2e 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Jobs.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Jobs.md @@ -259,11 +259,11 @@ is completed and all results are available. You can also use the `Wait-Job` cmdlet to wait for any or all of the results of the job. `Wait-Job` lets you wait for one or more specific job or for all jobs. -The following command uses the `Wait-Job` cmdlet to wait for a job with **ID** +The following command uses the `Wait-Job` cmdlet to wait for a job with **Id** 10. ```powershell -Wait-Job -ID 10 +Wait-Job -Id 10 ``` As a result, the PowerShell prompt is suppressed until the job is completed. @@ -273,7 +273,7 @@ You can also wait for a predetermined period of time. This command uses the the command prompt returns, but the job continues to run in the background. ```powershell -Wait-Job -ID 10 -Timeout 120 +Wait-Job -Id 10 -Timeout 120 ``` ## Stopping a job diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Join.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Join.md index 195c33f6682e..a2608740fcb2 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Join.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Join.md @@ -1,5 +1,5 @@ --- -description: Describes how the join operator (-join) combines multiple strings into a single string. +description: Describes how the join operator (`-join`) combines multiple strings into a single string. Locale: en-US ms.date: 06/09/2017 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_join?view=powershell-7.4&WT.mc_id=ps-gethelp @@ -10,7 +10,7 @@ title: about_Join ## Short description -Describes how the join operator (-join) combines multiple strings into a +Describes how the join operator (`-join`) combines multiple strings into a single string. ## Long description @@ -37,7 +37,7 @@ concatenated strings. The default is no delimiter (""). Remarks -The unary join operator (-join ) has higher precedence than a +The unary join operator (`-join `) has higher precedence than a comma. As a result, if you submit a comma-separated list of strings to the unary join operator, only the first string (before the first comma) is submitted to the join operator. diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Keywords.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Keywords.md index b4474b40ab29..bf09d9e45e4c 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Keywords.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Keywords.md @@ -37,12 +37,12 @@ about topic for the keyword and the information that follows the table. | `filter` | [about_Functions][14] | | `finally` | [about_Try_Catch_Finally][22] | | `for` | [about_For][09] | -| `foreach` | [about_ForEach][10] | +| `foreach` | [about_Foreach][10] | | `from` | Reserved for future use | | `function` | [about_Functions][14], [about_Functions_Advanced][13] | | `hidden` | [about_Hidden][15] | | `if` | [about_If][16] | -| `in` | [about_ForEach][10] | +| `in` | [about_Foreach][10] | | `param` | [about_Functions][14] | | `process` | [about_Functions][14], [about_Functions_Advanced][13] | | `return` | [about_Return][17] | @@ -162,7 +162,7 @@ also include `if` statements and some limited commands. Syntax: ```Syntax -data [-supportedCommand ] {} +data [-SupportedCommand ] {} ``` ## `do` @@ -294,7 +294,7 @@ C:\scripts\test>type test.ps1 3 exit 4 -C:\scripts\test>pwsh -file ./test.ps1 +C:\scripts\test>pwsh -File ./test.ps1 1 2 3 @@ -371,7 +371,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1> [, [type]<$pname2>]) + param ([type]<$PName1> [, [type]<$PName2>]) dynamicparam {} begin {} process {} @@ -385,7 +385,7 @@ statement list after the function name. Syntax: ```Syntax -function [] [([type]<$pname1>, [[type]<$pname2>])] { +function [] [([type]<$PName1>, [[type]<$PName2>])] { dynamicparam {} begin {} process {} @@ -433,7 +433,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1>[, [[type]<$pname2>]]) + param ([type]<$PName1>[, [[type]<$PName2>]]) } ``` @@ -567,7 +567,7 @@ include classes from modules. Namespace syntax: ```Syntax -using namespace <.Net-namespace> +using namespace <.NET-namespace> ``` Module syntax: @@ -622,7 +622,7 @@ do {} while () [07]: about_Do.md [08]: about_Enum.md [09]: about_For.md -[10]: about_ForEach.md +[10]: about_Foreach.md [11]: about_Functions_Advanced_Methods.md [12]: about_Functions_Advanced_Parameters.md [13]: about_Functions_Advanced.md diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Modes.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Modes.md index d3ec79ad18ea..57aee59a21cd 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Modes.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Language_Modes.md @@ -179,7 +179,7 @@ additional variables: - `$PSScriptRoot` - `$PSEdition` - `$EnabledExperimentalFeatures` -- Any environment variables, like `$ENV:TEMP` +- Any environment variables, like `$Env:TEMP` Only the following comparison operators are permitted: diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Logical_Operators.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Logical_Operators.md index 34836b7cb3f1..82699599500f 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Logical_Operators.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Logical_Operators.md @@ -60,8 +60,8 @@ of FALSE. All other integers have a value of TRUE. The syntax of the logical operators is as follows: ```Syntax - {-AND | -OR | -XOR} -{! | -NOT} + {-and | -or | -xor} +{! | -not} ``` Statements that use the logical operators return Boolean (TRUE or FALSE) @@ -72,7 +72,7 @@ determine the truth value of the statement. If the left operand in a statement that contains the and operator is FALSE, the right operand isn't evaluated. If the left operand in a statement that contains the or statement is TRUE, the right operand isn't evaluated. As a result, you can use these statements in -the same way that you would use the `If` statement. +the same way that you would use the `if` statement. ## See also diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md index 245510ab0d76..eb249dd8525c 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md @@ -225,7 +225,7 @@ PS> $CapitalizedProperty = @{ Value = { $this.ToUpper() } PassThru = $true } -PS> [System.Collections.Generic.List[object]]$MixedCollection = @( +PS> [System.Collections.Generic.List[Object]]$MixedCollection = @( 'a' ('b' | Add-Member @CapitalizedProperty) ('c' | Add-Member @CapitalizedProperty) @@ -279,7 +279,7 @@ successful method calls isn't returned. Terminating error conditions include: Consider the following example: ```powershell -class Class1 { [object] Foo() { return 'Bar' } } +class Class1 { [Object] Foo() { return 'Bar' } } class Class2 { [void] Foo() { throw 'Error' } } class Class3 {} diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Hidden.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Hidden.md index 13f8df42be5e..e984a05cc399 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Hidden.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Hidden.md @@ -48,7 +48,7 @@ PowerShell 5.0. ## EXAMPLE The following example shows how to use the `hidden` keyword in a class -definition. The **Car** class method, **Drive**, has a property, **rides**, +definition. The **Car** class method, **Drive**, has a property, **Rides**, that does not need to be viewed or changed as it merely tallies the number of times that **Drive** is called on the **Car** class. That metric that is not important to users of the class (consider, for example, that when you are @@ -68,20 +68,20 @@ later to identify all members that you have hidden. class Car { # Properties - [String] $Color - [String] $ModelYear + [string] $Color + [string] $ModelYear [int] $Distance # Method - [int] Drive ([int]$miles) + [int] Drive ([int]$Miles) { - $this.Distance += $miles - $this.rides++ + $this.Distance += $Miles + $this.Rides++ return $this.Distance } # Hidden property of the Drive method - hidden [int] $rides = 0 + hidden [int] $Rides = 0 } ``` @@ -93,7 +93,7 @@ $TestCar = [Car]::new() ``` After you create the new instance, pipe the contents of the `$TestCar` variable -to `Get-Member`. Observe that the **rides** property is not among the members +to `Get-Member`. Observe that the **Rides** property is not among the members listed in the `Get-Member` command results. ```output @@ -103,7 +103,7 @@ PS C:\Windows\system32> $TestCar | Get-Member Name MemberType Definition ---- ---------- ---------- -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() @@ -115,7 +115,7 @@ ModelYear Property string ModelYear {get;set;} ``` Now, try running `Get-Member` again, but this time, add the `-Force` parameter. -Note that the results contain the hidden **rides** property, among other +Note that the results contain the hidden **Rides** property, among other members that are hidden by default. ```output @@ -130,23 +130,23 @@ psadapted MemberSet psadapted {Color, ModelYear, Distance, psbase MemberSet psbase {Color, ModelYear, Distance,... psextended MemberSet psextended {} psobject MemberSet psobject {BaseObject, Members,... -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() get_Color Method string get_Color() get_Distance Method int get_Distance() get_ModelYear Method string get_ModelYear() -get_rides Method int get_rides() +get_Rides Method int get_Rides() set_Color Method void set_Color(string ) set_Distance Method void set_Distance(int ) set_ModelYear Method void set_ModelYear(string ) -set_rides Method void set_rides(int ) +set_Rides Method void set_Rides(int ) ToString Method string ToString() Color Property string Color {get;set;} Distance Property int Distance {get;set;} ModelYear Property string ModelYear {get;set;} -rides Property int rides {get;set;} +Rides Property int Rides {get;set;} ``` diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_If.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_If.md index ebf167924c90..2fe0e592a364 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_If.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_If.md @@ -49,7 +49,7 @@ statement. If both `` and `` evaluate to false, the You can use multiple `elseif` statements to chain a series of conditional tests. Each test is run only if all the previous tests are false. If you need to create an `if` statement that contains many `elseif` statements, consider -using a Switch statement instead. +using a `switch` statement instead. Examples: @@ -68,7 +68,7 @@ evaluates to true, and the statement list runs. However, if `$a` is less than or equal to `2` or isn't an existing variable, the `if` statement doesn't display a message. -By adding an Else statement, a message is displayed when $a is less than or +By adding an `else` statement, a message is displayed when $a is less than or equal to 2. As the next example shows: ```powershell diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md index 269825183622..5f883281f407 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md @@ -211,7 +211,7 @@ For more information, see [about_Operators][03]. ## New() method for types -Beginning in PowerShell 5.0, PowerShell adds a static `New()` method for all +Beginning in PowerShell 5.0, PowerShell adds a static `new()` method for all .NET types. The following examples produce the same result. ```powershell diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Job_Details.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Job_Details.md index 7e3f19339a3f..be3253aa7d58 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Job_Details.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Job_Details.md @@ -85,7 +85,7 @@ other cmdlets might work differently. The child jobs are stored in the **ChildJobs** property of the parent job object. The **ChildJobs** property can contain one or many child job objects. -The child job objects have a **Name**, **ID**, and **InstanceId** that differ +The child job objects have a **Name**, **Id**, and **InstanceId** that differ from the parent job so that you can manage the parent and child jobs individually or as a unit. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Jobs.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Jobs.md index 4203ffa6af09..36150d5bff19 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Jobs.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Jobs.md @@ -259,11 +259,11 @@ is completed and all results are available. You can also use the `Wait-Job` cmdlet to wait for any or all of the results of the job. `Wait-Job` lets you wait for one or more specific job or for all jobs. -The following command uses the `Wait-Job` cmdlet to wait for a job with **ID** +The following command uses the `Wait-Job` cmdlet to wait for a job with **Id** 10. ```powershell -Wait-Job -ID 10 +Wait-Job -Id 10 ``` As a result, the PowerShell prompt is suppressed until the job is completed. @@ -273,7 +273,7 @@ You can also wait for a predetermined period of time. This command uses the the command prompt returns, but the job continues to run in the background. ```powershell -Wait-Job -ID 10 -Timeout 120 +Wait-Job -Id 10 -Timeout 120 ``` ## Stopping a job diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Join.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Join.md index 6080dc90e41e..3169aa7c4c75 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Join.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Join.md @@ -1,5 +1,5 @@ --- -description: Describes how the join operator (-join) combines multiple strings into a single string. +description: Describes how the join operator (`-join`) combines multiple strings into a single string. Locale: en-US ms.date: 06/09/2017 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_join?view=powershell-7.5&WT.mc_id=ps-gethelp @@ -11,7 +11,7 @@ title: about_Join ## Short description -Describes how the join operator (-join) combines multiple strings into a +Describes how the join operator (`-join`) combines multiple strings into a single string. ## Long description @@ -38,7 +38,7 @@ concatenated strings. The default is no delimiter (""). Remarks -The unary join operator (-join ) has higher precedence than a +The unary join operator (`-join `) has higher precedence than a comma. As a result, if you submit a comma-separated list of strings to the unary join operator, only the first string (before the first comma) is submitted to the join operator. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Keywords.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Keywords.md index b44a46a95f7b..ba7e0f76c5e1 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Keywords.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Keywords.md @@ -37,12 +37,12 @@ about topic for the keyword and the information that follows the table. | `filter` | [about_Functions][14] | | `finally` | [about_Try_Catch_Finally][22] | | `for` | [about_For][09] | -| `foreach` | [about_ForEach][10] | +| `foreach` | [about_Foreach][10] | | `from` | Reserved for future use | | `function` | [about_Functions][14], [about_Functions_Advanced][13] | | `hidden` | [about_Hidden][15] | | `if` | [about_If][16] | -| `in` | [about_ForEach][10] | +| `in` | [about_Foreach][10] | | `param` | [about_Functions][14] | | `process` | [about_Functions][14], [about_Functions_Advanced][13] | | `return` | [about_Return][17] | @@ -162,7 +162,7 @@ also include `if` statements and some limited commands. Syntax: ```Syntax -data [-supportedCommand ] {} +data [-SupportedCommand ] {} ``` ## `do` @@ -294,7 +294,7 @@ C:\scripts\test>type test.ps1 3 exit 4 -C:\scripts\test>pwsh -file ./test.ps1 +C:\scripts\test>pwsh -File ./test.ps1 1 2 3 @@ -371,7 +371,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1> [, [type]<$pname2>]) + param ([type]<$PName1> [, [type]<$PName2>]) dynamicparam {} begin {} process {} @@ -385,7 +385,7 @@ statement list after the function name. Syntax: ```Syntax -function [] [([type]<$pname1>, [[type]<$pname2>])] { +function [] [([type]<$PName1>, [[type]<$PName2>])] { dynamicparam {} begin {} process {} @@ -433,7 +433,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1>[, [[type]<$pname2>]]) + param ([type]<$PName1>[, [[type]<$PName2>]]) } ``` @@ -567,7 +567,7 @@ include classes from modules. Namespace syntax: ```Syntax -using namespace <.Net-namespace> +using namespace <.NET-namespace> ``` Module syntax: @@ -622,7 +622,7 @@ do {} while () [07]: about_Do.md [08]: about_Enum.md [09]: about_For.md -[10]: about_ForEach.md +[10]: about_Foreach.md [11]: about_Functions_Advanced_Methods.md [12]: about_Functions_Advanced_Parameters.md [13]: about_Functions_Advanced.md diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Modes.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Modes.md index 5eefd778012b..bf113f57fb7c 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Modes.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Language_Modes.md @@ -179,7 +179,7 @@ additional variables: - `$PSScriptRoot` - `$PSEdition` - `$EnabledExperimentalFeatures` -- Any environment variables, like `$ENV:TEMP` +- Any environment variables, like `$Env:TEMP` Only the following comparison operators are permitted: diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Logical_Operators.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Logical_Operators.md index 1fb553fb44e7..6a0143627919 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Logical_Operators.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Logical_Operators.md @@ -61,8 +61,8 @@ of FALSE. All other integers have a value of TRUE. The syntax of the logical operators is as follows: ```Syntax - {-AND | -OR | -XOR} -{! | -NOT} + {-and | -or | -xor} +{! | -not} ``` Statements that use the logical operators return Boolean (TRUE or FALSE) @@ -73,7 +73,7 @@ determine the truth value of the statement. If the left operand in a statement that contains the and operator is FALSE, the right operand isn't evaluated. If the left operand in a statement that contains the or statement is TRUE, the right operand isn't evaluated. As a result, you can use these statements in -the same way that you would use the `If` statement. +the same way that you would use the `if` statement. ## See also diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md index 4e7ed434af41..daeff900d403 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md @@ -225,7 +225,7 @@ PS> $CapitalizedProperty = @{ Value = { $this.ToUpper() } PassThru = $true } -PS> [System.Collections.Generic.List[object]]$MixedCollection = @( +PS> [System.Collections.Generic.List[Object]]$MixedCollection = @( 'a' ('b' | Add-Member @CapitalizedProperty) ('c' | Add-Member @CapitalizedProperty) @@ -279,7 +279,7 @@ successful method calls isn't returned. Terminating error conditions include: Consider the following example: ```powershell -class Class1 { [object] Foo() { return 'Bar' } } +class Class1 { [Object] Foo() { return 'Bar' } } class Class2 { [void] Foo() { throw 'Error' } } class Class3 {} diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Hidden.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Hidden.md index fde36ceb54b3..2180340db4a3 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Hidden.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Hidden.md @@ -48,7 +48,7 @@ PowerShell 5.0. ## EXAMPLE The following example shows how to use the `hidden` keyword in a class -definition. The **Car** class method, **Drive**, has a property, **rides**, +definition. The **Car** class method, **Drive**, has a property, **Rides**, that does not need to be viewed or changed as it merely tallies the number of times that **Drive** is called on the **Car** class. That metric that is not important to users of the class (consider, for example, that when you are @@ -68,20 +68,20 @@ later to identify all members that you have hidden. class Car { # Properties - [String] $Color - [String] $ModelYear + [string] $Color + [string] $ModelYear [int] $Distance # Method - [int] Drive ([int]$miles) + [int] Drive ([int]$Miles) { - $this.Distance += $miles - $this.rides++ + $this.Distance += $Miles + $this.Rides++ return $this.Distance } # Hidden property of the Drive method - hidden [int] $rides = 0 + hidden [int] $Rides = 0 } ``` @@ -93,7 +93,7 @@ $TestCar = [Car]::new() ``` After you create the new instance, pipe the contents of the `$TestCar` variable -to `Get-Member`. Observe that the **rides** property is not among the members +to `Get-Member`. Observe that the **Rides** property is not among the members listed in the `Get-Member` command results. ```output @@ -103,7 +103,7 @@ PS C:\Windows\system32> $TestCar | Get-Member Name MemberType Definition ---- ---------- ---------- -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() @@ -115,7 +115,7 @@ ModelYear Property string ModelYear {get;set;} ``` Now, try running `Get-Member` again, but this time, add the `-Force` parameter. -Note that the results contain the hidden **rides** property, among other +Note that the results contain the hidden **Rides** property, among other members that are hidden by default. ```output @@ -130,23 +130,23 @@ psadapted MemberSet psadapted {Color, ModelYear, Distance, psbase MemberSet psbase {Color, ModelYear, Distance,... psextended MemberSet psextended {} psobject MemberSet psobject {BaseObject, Members,... -Drive Method int Drive(int miles) +Drive Method int Drive(int Miles) Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() get_Color Method string get_Color() get_Distance Method int get_Distance() get_ModelYear Method string get_ModelYear() -get_rides Method int get_rides() +get_Rides Method int get_Rides() set_Color Method void set_Color(string ) set_Distance Method void set_Distance(int ) set_ModelYear Method void set_ModelYear(string ) -set_rides Method void set_rides(int ) +set_Rides Method void set_Rides(int ) ToString Method string ToString() Color Property string Color {get;set;} Distance Property int Distance {get;set;} ModelYear Property string ModelYear {get;set;} -rides Property int rides {get;set;} +Rides Property int Rides {get;set;} ``` diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_If.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_If.md index 935643daafb0..1ed74901191f 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_If.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_If.md @@ -49,7 +49,7 @@ statement. If both `` and `` evaluate to false, the You can use multiple `elseif` statements to chain a series of conditional tests. Each test is run only if all the previous tests are false. If you need to create an `if` statement that contains many `elseif` statements, consider -using a Switch statement instead. +using a `switch` statement instead. Examples: @@ -68,7 +68,7 @@ evaluates to true, and the statement list runs. However, if `$a` is less than or equal to `2` or isn't an existing variable, the `if` statement doesn't display a message. -By adding an Else statement, a message is displayed when $a is less than or +By adding an `else` statement, a message is displayed when $a is less than or equal to 2. As the next example shows: ```powershell diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md index e3da4889f275..6d2c687b2c26 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md @@ -211,7 +211,7 @@ For more information, see [about_Operators][03]. ## New() method for types -Beginning in PowerShell 5.0, PowerShell adds a static `New()` method for all +Beginning in PowerShell 5.0, PowerShell adds a static `new()` method for all .NET types. The following examples produce the same result. ```powershell diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Job_Details.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Job_Details.md index 85ccd4b72c69..632e828dcb74 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Job_Details.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Job_Details.md @@ -85,7 +85,7 @@ other cmdlets might work differently. The child jobs are stored in the **ChildJobs** property of the parent job object. The **ChildJobs** property can contain one or many child job objects. -The child job objects have a **Name**, **ID**, and **InstanceId** that differ +The child job objects have a **Name**, **Id**, and **InstanceId** that differ from the parent job so that you can manage the parent and child jobs individually or as a unit. diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Jobs.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Jobs.md index 12fec6859190..d26bbaf34b3c 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Jobs.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Jobs.md @@ -259,11 +259,11 @@ is completed and all results are available. You can also use the `Wait-Job` cmdlet to wait for any or all of the results of the job. `Wait-Job` lets you wait for one or more specific job or for all jobs. -The following command uses the `Wait-Job` cmdlet to wait for a job with **ID** +The following command uses the `Wait-Job` cmdlet to wait for a job with **Id** 10. ```powershell -Wait-Job -ID 10 +Wait-Job -Id 10 ``` As a result, the PowerShell prompt is suppressed until the job is completed. @@ -273,7 +273,7 @@ You can also wait for a predetermined period of time. This command uses the the command prompt returns, but the job continues to run in the background. ```powershell -Wait-Job -ID 10 -Timeout 120 +Wait-Job -Id 10 -Timeout 120 ``` ## Stopping a job diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Join.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Join.md index 770e6a05ec2c..ceda5907f23a 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Join.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Join.md @@ -1,5 +1,5 @@ --- -description: Describes how the join operator (-join) combines multiple strings into a single string. +description: Describes how the join operator (`-join`) combines multiple strings into a single string. Locale: en-US ms.date: 06/09/2017 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_join?view=powershell-7.6&WT.mc_id=ps-gethelp @@ -10,7 +10,7 @@ title: about_Join ## Short description -Describes how the join operator (-join) combines multiple strings into a +Describes how the join operator (`-join`) combines multiple strings into a single string. ## Long description @@ -37,7 +37,7 @@ concatenated strings. The default is no delimiter (""). Remarks -The unary join operator (-join ) has higher precedence than a +The unary join operator (`-join `) has higher precedence than a comma. As a result, if you submit a comma-separated list of strings to the unary join operator, only the first string (before the first comma) is submitted to the join operator. diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Keywords.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Keywords.md index 587e21bd4dd4..9b5d9e6072b7 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Keywords.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Keywords.md @@ -37,12 +37,12 @@ about topic for the keyword and the information that follows the table. | `filter` | [about_Functions][14] | | `finally` | [about_Try_Catch_Finally][22] | | `for` | [about_For][09] | -| `foreach` | [about_ForEach][10] | +| `foreach` | [about_Foreach][10] | | `from` | Reserved for future use | | `function` | [about_Functions][14], [about_Functions_Advanced][13] | | `hidden` | [about_Hidden][15] | | `if` | [about_If][16] | -| `in` | [about_ForEach][10] | +| `in` | [about_Foreach][10] | | `param` | [about_Functions][14] | | `process` | [about_Functions][14], [about_Functions_Advanced][13] | | `return` | [about_Return][17] | @@ -162,7 +162,7 @@ also include `if` statements and some limited commands. Syntax: ```Syntax -data [-supportedCommand ] {} +data [-SupportedCommand ] {} ``` ## `do` @@ -294,7 +294,7 @@ C:\scripts\test>type test.ps1 3 exit 4 -C:\scripts\test>pwsh -file ./test.ps1 +C:\scripts\test>pwsh -File ./test.ps1 1 2 3 @@ -371,7 +371,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1> [, [type]<$pname2>]) + param ([type]<$PName1> [, [type]<$PName2>]) dynamicparam {} begin {} process {} @@ -385,7 +385,7 @@ statement list after the function name. Syntax: ```Syntax -function [] [([type]<$pname1>, [[type]<$pname2>])] { +function [] [([type]<$PName1>, [[type]<$PName2>])] { dynamicparam {} begin {} process {} @@ -433,7 +433,7 @@ Syntax: ```Syntax function [] { - param ([type]<$pname1>[, [[type]<$pname2>]]) + param ([type]<$PName1>[, [[type]<$PName2>]]) } ``` @@ -567,7 +567,7 @@ include classes from modules. Namespace syntax: ```Syntax -using namespace <.Net-namespace> +using namespace <.NET-namespace> ``` Module syntax: @@ -622,7 +622,7 @@ do {} while () [07]: about_Do.md [08]: about_Enum.md [09]: about_For.md -[10]: about_ForEach.md +[10]: about_Foreach.md [11]: about_Functions_Advanced_Methods.md [12]: about_Functions_Advanced_Parameters.md [13]: about_Functions_Advanced.md diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Modes.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Modes.md index 45a63e4ee055..e75e37a8bda1 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Modes.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Language_Modes.md @@ -179,7 +179,7 @@ additional variables: - `$PSScriptRoot` - `$PSEdition` - `$EnabledExperimentalFeatures` -- Any environment variables, like `$ENV:TEMP` +- Any environment variables, like `$Env:TEMP` Only the following comparison operators are permitted: diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Logical_Operators.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Logical_Operators.md index 53031c43b2a4..dd3084d47233 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Logical_Operators.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Logical_Operators.md @@ -61,8 +61,8 @@ of FALSE. All other integers have a value of TRUE. The syntax of the logical operators is as follows: ```Syntax - {-AND | -OR | -XOR} -{! | -NOT} + {-and | -or | -xor} +{! | -not} ``` Statements that use the logical operators return Boolean (TRUE or FALSE) @@ -73,7 +73,7 @@ determine the truth value of the statement. If the left operand in a statement that contains the and operator is FALSE, the right operand isn't evaluated. If the left operand in a statement that contains the or statement is TRUE, the right operand isn't evaluated. As a result, you can use these statements in -the same way that you would use the `If` statement. +the same way that you would use the `if` statement. ## See also diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md index 2d06efddd97d..f2aff5e9d86f 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Member-Access_Enumeration.md @@ -225,7 +225,7 @@ PS> $CapitalizedProperty = @{ Value = { $this.ToUpper() } PassThru = $true } -PS> [System.Collections.Generic.List[object]]$MixedCollection = @( +PS> [System.Collections.Generic.List[Object]]$MixedCollection = @( 'a' ('b' | Add-Member @CapitalizedProperty) ('c' | Add-Member @CapitalizedProperty) @@ -279,7 +279,7 @@ successful method calls isn't returned. Terminating error conditions include: Consider the following example: ```powershell -class Class1 { [object] Foo() { return 'Bar' } } +class Class1 { [Object] Foo() { return 'Bar' } } class Class2 { [void] Foo() { throw 'Error' } } class Class3 {}