From 225441e87da5800aff4819c967c7d6fb1e09654b Mon Sep 17 00:00:00 2001 From: Arie Heinrich Date: Sat, 18 Jan 2025 17:36:36 +0100 Subject: [PATCH 1/4] Markdown and PS Styles (#11697) * PS style and format * fix reference --- .../Expand-Archive.md | 2 +- .../Microsoft.PowerShell.Archive.md | 4 +- .../About/about_ANSI_Terminals.md | 2 +- .../About/about_Alias_Provider.md | 67 +++++++++++-------- .../About/about_Aliases.md | 4 +- .../About/about_Arithmetic_Operators.md | 24 +++---- .../About/about_Arrays.md | 7 +- .../About/about_Assignment_Operators.md | 5 +- .../About/about_Automatic_Variables.md | 16 ++--- .../About/about_Break.md | 7 +- .../About/about_Built-in_Functions.md | 4 +- .../About/about_Calling_Generic_Methods.md | 15 +++-- .../About/about_Case-Sensitivity.md | 33 ++++----- .../About/about_Character_Encoding.md | 39 ++++++----- .../About/about_CimSession.md | 13 ++-- .../About/about_Classes_Constructors.md | 1 - .../About/about_Classes_Inheritance.md | 9 ++- .../About/about_Classes_Methods.md | 3 +- .../About/about_Classes_Properties.md | 3 +- .../About/about_Comment_Based_Help.md | 2 +- .../About/about_CommonParameters.md | 6 +- .../About/about_Comparison_Operators.md | 8 +-- .../About/about_Continue.md | 12 ++-- 23 files changed, 155 insertions(+), 131 deletions(-) diff --git a/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md b/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md index 3de27e54f78e..7b3e378f92fe 100644 --- a/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md +++ b/reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md @@ -210,4 +210,4 @@ different than the source filename stored in the archive. ## RELATED LINKS -[Compress-Archive](compress-archive.md) +[Compress-Archive](Compress-Archive.md) diff --git a/reference/7.5/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.md b/reference/7.5/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.md index 4857f52248d5..72018c6476b0 100644 --- a/reference/7.5/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.md +++ b/reference/7.5/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.md @@ -13,7 +13,9 @@ title: Microsoft.PowerShell.Archive ## Description -This section contains the help topics for the cmdlets that are installed with the PowerShell Microsoft.PowerShell.Archive module. The Archive module contains cmdlets that let you create and extract archive or ZIP files. +This section contains the help topics for the cmdlets that are installed with the PowerShell +Microsoft.PowerShell.Archive module. The Archive module contains cmdlets that let you create and +extract archive or ZIP files. ## Microsoft.PowerShell.Archive Cmdlets diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md index 89b6f13d14a0..d491f586b7eb 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md @@ -253,7 +253,7 @@ The following values of `$env:TERM` change the behavior as follows: - `dumb` - sets `$Host.UI.SupportsVirtualTerminal = $false` - `xterm-mono` - sets `$PSStyle.OutputRendering = PlainText` -- `xtermm` - sets `$PSStyle.OutputRendering = PlainText` +- `xterm` - sets `$PSStyle.OutputRendering = PlainText` If `$env:NO_COLOR` exists, then `$PSStyle.OutputRendering` is set to **PlainText**. For more information about the **NO_COLOR** environment diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Alias_Provider.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Alias_Provider.md index 939598938192..8f587a0c4ae5 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Alias_Provider.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Alias_Provider.md @@ -40,28 +40,27 @@ The aliases have no child items. The **Alias** provider supports the following cmdlets, which are covered in this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) -- [Clear-Item](xref:Microsoft.PowerShell.Management.Clear-Item) +- [Get-Location][01] +- [Set-Location][02] +- [Get-Item][03] +- [New-Item][04] +- [Remove-Item][05] +- [Clear-Item][06] PowerShell includes a set of cmdlets that are designed to view and to change aliases. When you use **Alias** cmdlets, you do not need to specify the `Alias:` drive in the name. This article does not cover working with **Alias** cmdlets. -- [Export-Alias](xref:Microsoft.PowerShell.Utility.Export-Alias) -- [Get-Alias](xref:Microsoft.PowerShell.Utility.Get-Alias) -- [Import-Alias](xref:Microsoft.PowerShell.Utility.Import-Alias) -- [New-Alias](xref:Microsoft.PowerShell.Utility.New-Alias) -- [Set-Alias](xref:Microsoft.PowerShell.Utility.Set-Alias) +- [Export-Alias][07] +- [Get-Alias][08] +- [Import-Alias][09] +- [New-Alias][10] +- [Set-Alias][11] ## Types exposed by this provider -Each alias is an instance of the -[System.Management.Automation.AliasInfo](/dotnet/api/system.management.automation.aliasinfo) +Each alias is an instance of the [System.Management.Automation.AliasInfo][12] class. ## Navigating the Alias drive @@ -87,11 +86,8 @@ path. > [!NOTE] > PowerShell uses aliases to allow you a familiar way to work with provider > paths. Commands such as `dir` and `ls` are now aliases on Windows and `dir` -> on Linux and macOS for [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem), -> `cd` is an alias for -> [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location). and `pwd` -> is an alias for -> [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location). +> on Linux and macOS for [Get-ChildItem][13], `cd` is an alias for +> [Set-Location][02] and `pwd` is an alias for [Get-Location][01]. ### Displaying the Contents of the Alias: drive @@ -198,7 +194,7 @@ cmdlet. The `-Options` parameter is available in `Set-Item` when you use it with the **Alias** or **Function** provider. ```powershell -Set-Item -Path Alias:dir -Options "AllScope,ReadOnly" +Set-Item -Path Alias:dir -Options "AllScope, ReadOnly" ``` ### Change an aliases referenced command @@ -293,8 +289,8 @@ Determines the value of the **Options** property of an alias. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Set-Item](xref:Microsoft.PowerShell.Management.Set-Item) +- [New-Item][04] +- [Set-Item][14] ## Using the pipeline @@ -309,10 +305,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file system -drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file system -drive. +[Get-Help][15] command in a file system drive or use the `-Path` parameter of +[Get-Help][15] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -324,5 +318,24 @@ Get-Help Get-ChildItem -Path alias: ## See also -- [about_Aliases](about_Aliases.md) -- [about_Providers](about_Providers.md) +- [about_Aliases][16] +- [about_Providers][17] + + +[01]: xref:Microsoft.PowerShell.Management.Get-Location +[02]: xref:Microsoft.PowerShell.Management.Set-Location +[03]: xref:Microsoft.PowerShell.Management.Get-Item +[04]: xref:Microsoft.PowerShell.Management.New-Item +[05]: xref:Microsoft.PowerShell.Management.Remove-Item +[06]: xref:Microsoft.PowerShell.Management.Clear-Item +[07]: xref:Microsoft.PowerShell.Utility.Export-Alias +[08]: xref:Microsoft.PowerShell.Utility.Get-Alias +[09]: xref:Microsoft.PowerShell.Utility.Import-Alias +[10]: xref:Microsoft.PowerShell.Utility.New-Alias +[11]: xref:Microsoft.PowerShell.Utility.Set-Alias +[12]: /dotnet/api/system.management.automation.aliasinfo +[13]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[14]: xref:Microsoft.PowerShell.Management.Set-Item +[15]: xref:Microsoft.PowerShell.Core.Get-Help +[16]: about_Aliases.md +[17]: about_Providers.md diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Aliases.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Aliases.md index a274757140a5..d36ebaab1b97 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Aliases.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Aliases.md @@ -129,8 +129,8 @@ in the current session, type: Get-Alias ``` -To get particular aliases, use the Name parameter of the `Get-Alias` cmdlet. For -example, to get aliases that begin with "p", type: +To get particular aliases, use the Name parameter of the `Get-Alias` cmdlet. +For example, to get aliases that begin with "p", type: ```powershell Get-Alias -Name p* diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Arithmetic_Operators.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Arithmetic_Operators.md index 66405c4c2e61..53ea1cbd7d7c 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Arithmetic_Operators.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Arithmetic_Operators.md @@ -203,7 +203,7 @@ result without losing precision. For example: (2 + 3.1).GetType().FullName ``` -```output +```Output 5.1 System.Int32 System.Double @@ -217,7 +217,7 @@ is widened to accommodate the result, as in the following example: (512MB * 512MB).GetType().FullName ``` -```output +```Output System.Int32 System.Double ``` @@ -230,7 +230,7 @@ the unsigned integer is too large to be cast to `Int32`: ([int32]::minvalue + [uint32]::maxvalue).GetType().FullName ``` -```output +```Output System.Int64 ``` @@ -269,8 +269,8 @@ PS> [ulong](9223372036854775807 + 2) 9223372036854775808 ``` -Defining the larger value as `[ulong]` first avoids the problem and produces the -correct result. +Defining the larger value as `[ulong]` first avoids the problem and produces +the correct result. ```powershell PS> 9223372036854775807ul + 2 @@ -327,7 +327,7 @@ $b = "A","B","C" $a + $b ``` -```output +```Output 1 2 3 @@ -390,7 +390,7 @@ $hash2 = @{c1="Server01"; c2="Server02"} $hash1 + $hash2 ``` -```output +```Output Name Value ---- ----- c2 Server02 @@ -409,7 +409,7 @@ $hash2 = @{c1="Server01"; c="Server02"} $hash1 + $hash2 ``` -```output +```Output OperationStopped: Line | 3 | $hash1 + $hash2 @@ -427,7 +427,7 @@ $array2 = $array1 + $hash1 $array2 ``` -```output +```Output 0 Hello World @@ -448,7 +448,7 @@ However, you can't add any other type to a hash table. $hash1 + 2 ``` -```output +```Output InvalidOperation: A hash table can only be added to another hash table. ``` @@ -463,7 +463,7 @@ $array = @() $array ``` -```output +```Output 0 1 2 @@ -508,7 +508,7 @@ results are then added using the `+` operator. Get-Process | Where-Object { ($_.ws * 2) -gt 50mb } ``` -```output +```Output Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- 1896 39 50968 30620 264 1,572.55 1104 explorer diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md index cd7cebefe88b..45768ed59a21 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md @@ -639,8 +639,8 @@ The value of `mode` must be a [WhereOperatorSelectionMode][02] enum value: - `Default` (`0`) - Return all items - `First` (`1`) - Return the first item - `Last` (`2`) - Return the last item -- `SkipUntil` (`3`) - Skip items until condition is true, return all the remaining - items (including the first item for which the condition is true) +- `SkipUntil` (`3`) - Skip items until condition is true, return all the + remaining items (including the first item for which the condition is true) - `Until` (`4`) - Return all items until condition is true - `Split` (`5`) - Return an array of two elements - The first element contains matching items @@ -1018,8 +1018,7 @@ PS> [Collections.Generic.Dictionary[string, int]]::new()['nosuchkey'] # No output ($null) PS> [Collections.Generic.Dictionary[string, int]]::new().Item('nosuchkey') -GetValueInvocationException: Exception getting "Item": "The given key 'nosuchkey' - was not present in the dictionary." +GetValueInvocationException: Exception getting "Item": "The given key 'nosuchkey' was not present in the dictionary." ``` ## Member-access enumeration diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md index 899e2bdb62ab..048248822add 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md @@ -199,7 +199,7 @@ $a += 2 $a ``` -``` +```Output 6 ``` @@ -646,8 +646,7 @@ $x 100 ``` -For more information, see -[Null-coalescing operator][04]. +For more information, see [Null-coalescing operator][04]. ## Microsoft .NET types diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md index 72abf2a8feb9..299335f092ea 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md @@ -7,7 +7,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: about_Automatic_Variables --- - # about_Automatic_Variables ## Short description @@ -422,7 +421,7 @@ the objects. ```powershell $a = "one", $null, "three" -$a.count +$a.Count ``` ```Output @@ -433,7 +432,7 @@ If you pipe the `$null` variable to the `ForEach-Object` cmdlet, it generates a value for `$null`, just as it does for the other objects ```powershell -"one", $null, "three" | ForEach-Object { "Hello " + $_} +"one", $null, "three" | ForEach-Object {"Hello " + $_} ``` ```Output @@ -451,8 +450,8 @@ were ignored. ```powershell $calendar = @($null, $null, "Meeting", $null, $null, "Team Lunch", $null) -$days = "Sunday","Monday","Tuesday","Wednesday","Thursday", - "Friday","Saturday" +$days = "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday" $currentDay = 0 foreach($day in $calendar) { @@ -744,10 +743,9 @@ isn't considered best practice. ### MoveNext -The [MoveNext][76] method -advances the enumerator to the next element of the collection. **MoveNext** -returns `True` if the enumerator was successfully advanced, `False` if the -enumerator has passed the end of the collection. +The [MoveNext][76] method advances the enumerator to the next element of the +collection. **MoveNext** returns `True` if the enumerator was successfully +advanced, `False` if the enumerator has passed the end of the collection. > [!NOTE] > The **Boolean** value returned by **MoveNext** is sent to the output stream. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md index 7ada85c133b1..e85f34bda438 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md @@ -123,7 +123,8 @@ even pass control across script and function call boundaries. ## Using `break` in a `switch` statement -In a `switch`construct, `break` causes PowerShell to exit the `switch` code block. +In a `switch`construct, `break` causes PowerShell to exit the `switch` code +block. The `break` keyword is used to leave the `switch` construct. For example, the following `switch` statement uses `break` statements to test for the most @@ -190,8 +191,8 @@ function test { test ``` -Notice that execution stops at the exception. The `After loop` is never reached. -The exception is re-thrown after the `trap` executes. +Notice that execution stops at the exception. The `After loop` is never +reached. The exception is re-thrown after the `trap` executes. ```Output Before loop diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md index 4ced13fef523..ff9ab9f36f44 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md @@ -69,8 +69,8 @@ This function clears the screen. For more information, see ## `TabExpansion2` -This is the default function to use for tab expansion. For more information, see -[TabExpansion2](xref:Microsoft.PowerShell.Core.TabExpansion2). +This is the default function to use for tab expansion. For more information, +see [TabExpansion2](xref:Microsoft.PowerShell.Core.TabExpansion2). ## `oss` diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md index 2bc88d87cfac..3afa59d77fdb 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md @@ -9,8 +9,8 @@ title: about_Calling_Generic_Methods Generics let you tailor a method, class, structure, or interface to the precise data type it acts upon. For example, instead of using the - class, which allows keys and values to be -of any type, you can use the +[System.Collections.Hashtable][01] class, which allows keys and values to be +of any type, you can use the [System.Collections.Generic.Dictionary%602][02] generic class and specify the types allowed for the **key** and **value** properties. Generics provide increased code reusability and type safety. @@ -26,8 +26,7 @@ generic method `Empty()` that takes no formal parameters. Prior to PowerShell 7.3, to ensure proper method resolution you had to use complicated workarounds using .NET reflection. For an example, see Lee Holmes' -blog post -[Invoking generic methods on non-generic classes in PowerShell](https://www.leeholmes.com/invoking-generic-methods-on-non-generic-classes-in-powershell/). +blog post [Invoking generic methods on non-generic classes in PowerShell][03]. Beginning with PowerShell 7.3, you can specify the types for a generic method. @@ -53,7 +52,7 @@ types, like `[string, int]`, including other generic types like The `method_arguments` can be zero or more items. -For more information, see [Generics in .NET](/dotnet/standard/generics/). +For more information, see [Generics in .NET][04]. ## Example @@ -88,3 +87,9 @@ The output shows each value raised to the power of 3. 64 125 ``` + + +[01]: xref:System.Collections.Hashtable +[02]: xref:System.Collections.Generic.Dictionary%602 +[03]: https://www.leeholmes.com/invoking-generic-methods-on-non-generic-classes-in-powershell/ +[04]: /dotnet/standard/generics/ diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Case-Sensitivity.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Case-Sensitivity.md index 93018b44585a..b25670c39ca5 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Case-Sensitivity.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Case-Sensitivity.md @@ -14,35 +14,38 @@ PowerShell is as case-insensitive as possible while preserving case. ## Long description -As a general principle, PowerShell is as case insensitive as possible while preserving case and not -breaking the underlying OS. +As a general principle, PowerShell is as case insensitive as possible while +preserving case and not breaking the underlying OS. ### On Unix-based systems -On Unix-based systems, PowerShell is case-sensitive because filesystem manipulation and environment -variables directly affect the underlying operating system and integration with other tools. +On Unix-based systems, PowerShell is case-sensitive because filesystem +manipulation and environment variables directly affect the underlying +operating system and integration with other tools. ## On all systems - PowerShell variables are case-insensitive - Variable names have no interaction between them and the underlying operating system. PowerShell - treats them case-insensitively. + Variable names have no interaction between them and the underlying operating + system. PowerShell treats them case-insensitively. - Module names are case-insensitive (with exceptions) - The _name_ of the module is purely a PowerShell concept and treated case-insensitively. However, there - is a strong mapping to a foldername, which can be case-sensitive in the underlying operating - system. Importing two modules with the same case-insensitive name has the same behavior as + The _name_ of the module is purely a PowerShell concept and treated + case-insensitively. However, there is a strong mapping to a foldername, which + can be case-sensitive in the underlying operating system. Importing two| + modules with the same case-insensitive name has the same behavior as importing two modules with the same name from different paths. - The name of a module is stored in the session state using the case by which it was imported. The - name, as stored in the session state, is used by `Update-Help` when looking for new help files. - The web service that serves the help files for Microsoft uses a case-sensitive filesystem. When - the case of the imported name of the module doesn't match, `Update-Help` can't find the help files - and reports an error. + The name of a module is stored in the session state using the case by which + it was imported. The name, as stored in the session state, is used + `Update-Help` when looking for new help files. + The web service that serves the help files for Microsoft uses a + ase-sensitive filesystem. When the case of the imported name of the module + doesn't match, `Update-Help` can't find the help files and reports an error. ## Related links -- [about_Environment_Variables](about_environment_variables.md) +- [about_Environment_Variables](about_Environment_Variables.md) - [Import-Module](xref:Microsoft.PowerShell.Core.Import-Module) diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md index 95934c9da9dd..0c0e28dfa812 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Character_Encoding.md @@ -17,8 +17,7 @@ data. Unicode is a worldwide character-encoding standard. The system uses Unicode exclusively for character and string manipulation. For a detailed description -of all aspects of Unicode, refer to -[The Unicode Standard](https://www.unicode.org/standard/standard.html). +of all aspects of Unicode, refer to [The Unicode Standard][01]. Windows supports Unicode and traditional character sets. Traditional character sets, such as Windows code pages, use 8-bit values or combinations of 8-bit @@ -50,8 +49,7 @@ The following cmdlets have the **Encoding** parameter: The byte-order-mark (BOM) is a _Unicode signature_ in the first few bytes of a file or text stream that indicate which Unicode encoding used for the data. For -more information, see the -[Byte order mark](/globalization/encoding/byte-order-mark) documentation. +more information, see the [Byte order mark][02] documentation. In Windows PowerShell, any Unicode encoding, except `UTF7`, always creates a BOM. PowerShell (v6 and higher) defaults to `utf8NoBOM` for all text output. @@ -93,9 +91,9 @@ In PowerShell 5.1, the **Encoding** parameter supports the following values: - `UTF7` Uses UTF-7. - `UTF8` Uses UTF-8 (with BOM). -In general, Windows PowerShell uses the Unicode -[UTF-16LE](https://wikipedia.org/wiki/UTF-16) encoding by default. However, -the default encoding used by cmdlets in Windows PowerShell is not consistent. +In general, Windows PowerShell uses the Unicode [UTF-16LE][03] encoding by +default. However, the default encoding used by cmdlets in Windows PowerShell +is not consistent. > [!NOTE] > Using any Unicode encoding, except `UTF7`, always creates a BOM. @@ -105,7 +103,7 @@ For cmdlets that write output to files: - `Out-File` and the redirection operators `>` and `>>` create UTF-16LE, which notably differs from `Set-Content` and `Add-Content`. -- `New-ModuleManifest` and `Export-CliXml` also create UTF-16LE files. +- `New-ModuleManifest` and `Export-Clixml` also create UTF-16LE files. - When the target file is empty or doesn't exist, `Set-Content` and `Add-Content` use `Default` encoding. `Default` is the encoding specified by @@ -150,7 +148,7 @@ For cmdlets that read string data in the absence of a BOM: encoding. ANSI is also what the PowerShell engine uses when it reads source code from files. -- `Import-Csv`, `Import-CliXml`, and `Select-String` assume `Utf8` in the +- `Import-Csv`, `Import-Clixml`, and `Select-String` assume `Utf8` in the absence of a BOM. ## Character encoding in PowerShell @@ -176,10 +174,9 @@ PowerShell defaults to `utf8NoBOM` for all output. Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, -see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage). +see the .NET documentation for [Encoding.CodePage][04]. -Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** +Starting with PowerShell 7.4, you can use the `ANSI` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. @@ -191,8 +188,7 @@ encoding behavior. - `$PSDefaultParameterValues` - `$OutputEncoding` -For more information, see -[about_Preference_Variables](about_Preference_Variables.md). +For more information, see [about_Preference_Variables][05]. Beginning in PowerShell 5.1, the redirection operators (`>` and `>>`) call the `Out-File` cmdlet. Therefore, you can set the default encoding of them using @@ -225,10 +221,17 @@ the output redirection operators and PowerShell cmdlets use to save to files. ## See also -- [about_Preference_Variables](about_Preference_Variables.md) +- [about_Preference_Variables][05] - [Byte order mark](https://wikipedia.org/wiki/Byte_order_mark) - [Code Pages - Win32 apps](/windows/win32/intl/code-pages) -- [Encoding.CodePage](/dotnet/api/system.text.encoding.codepage) +- [Encoding.CodePage][04] - [Introduction to character encoding in .NET](/dotnet/standard/base-types/character-encoding-introduction) -- [The Unicode Standard](https://www.unicode.org/standard/standard.html) -- [UTF-16LE](https://wikipedia.org/wiki/UTF-16) +- [The Unicode Standard][01] +- [UTF-16LE][03] + + +[01]: https://www.unicode.org/standard/standard.html +[02]: /globalization/encoding/byte-order-mark +[03]: https://wikipedia.org/wiki/UTF-16 +[04]: /dotnet/api/system.text.encoding.codepage +[05]: about_Preference_Variables.md diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_CimSession.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_CimSession.md index 3b4bb07e8da2..47441b668304 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_CimSession.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_CimSession.md @@ -36,7 +36,7 @@ If you create a **PSSession** instead of using a CIM session, PowerShell validates connection settings, and then establishes and maintains the connection. If you use CIM sessions, PowerShell does not open a network connection until needed. For more information about PowerShell sessions, see -[about_PSSessions](about_PSSessions.md). +[about_PSSessions][01]. ## When to use a CIM session @@ -57,7 +57,7 @@ Management (WinRM). CIM sessions do not impose the WinRM limits. CIM-based Cmdlet Definition XML (CDXML) cmdlets can be written to use any WMI Provider. All WMI providers use **CimSession** objects. For more information -about CDXML, see [CDXML definition and terms](/previous-versions/windows/desktop/wmi_v2/cdxml-overview). +about CDXML, see [CDXML definition and terms][02]. CDXML cmdlets have an automatic **CimSession** parameter that can take an array of **CimSession** objects. By default, PowerShell limits number of concurrent @@ -67,5 +67,10 @@ understand the **ThrottleLimit**. ## See also -- [about_PSSessions](about_PSSessions.md) -- [New-CimSession](xref:CimCmdlets.New-CimSession) +- [about_PSSessions][01] +- [New-CimSession][03] + + +[01]: about_PSSessions.md +[02]: /previous-versions/windows/desktop/wmi_v2/cdxml-overview +[03]: xref:CimCmdlets.New-CimSession diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Constructors.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Constructors.md index cf40c8e7e003..fcbfc9c4039e 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Constructors.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Constructors.md @@ -6,7 +6,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: about_Classes_Constructors --- - # about_Classes_Constructors ## Short description diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Inheritance.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Inheritance.md index 805ad56d5ba2..60067de22216 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Inheritance.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Inheritance.md @@ -6,7 +6,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: about_Classes_Inheritance --- - # about_Classes_Inheritance ## Short description @@ -18,8 +17,8 @@ Describes how you can define classes that extend other types. PowerShell classes support _inheritance_, which allows you to define a child class that reuses (inherits), extends, or modifies the behavior of a parent class. The class whose members are inherited is called the _base class_. The -class that inherits the members of the base class is called the _derived -class_. +class that inherits the members of the base class is called the +_derived class_. PowerShell supports single inheritance only. A class can only inherit from a single class. However, inheritance is transitive, which allows you to define an @@ -1496,8 +1495,8 @@ the value of an inherited static property in a class that doesn't override the property might have unintended effects for classes derived from the same base class. -[Example 1][05] shows how -derived classes that inherit, extend, and override the base class properties. +[Example 1][05] shows how derived classes that inherit, extend, and override +the base class properties. ### Deriving from generics diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Methods.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Methods.md index fc22e9b0e7d2..7373567f7e33 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Methods.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Methods.md @@ -6,7 +6,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: about_Classes_Methods --- - # about_Classes_Methods ## Short description @@ -800,7 +799,7 @@ PowerShell class methods have the following limitations: [01]: about_Preference_Variables.md [02]: #hidden-methods [03]: #static-methods -[04]: about_functions_advanced_parameters.md#parameter-and-variable-validation-attributes +[04]: about_Functions_Advanced_Parameters.md#parameter-and-variable-validation-attributes [05]: #example-4---static-method-with-overloads [06]: #defining-instance-methods-with-update-typedata [07]: about_Automatic_Variables.md diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Properties.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Properties.md index ec9f33b8acb0..51d58cf4eab3 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Properties.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Classes_Properties.md @@ -6,7 +6,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: about_Classes_Properties --- - # about_Classes_Properties ## Short description @@ -952,7 +951,7 @@ PowerShell class properties have the following limitations: [06]: /dotnet/csharp/language-reference/builtin-types/default-values [07]: about_Hidden.md [08]: about_Classes_Inheritance.md -[09]: about_functions_advanced_parameters.md#parameter-and-variable-validation-attributes +[09]: about_Functions_Advanced_Parameters.md#parameter-and-variable-validation-attributes [10]: about_Classes.md [11]: about_Classes_Constructors.md [12]: about_Classes_Inheritance.md diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md index ba9bb52e92cc..13ac047905af 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comment_Based_Help.md @@ -171,7 +171,7 @@ function Get-Function { } The following are valid comment-based help keywords. These keywords can appear in any order in the comment-based help, and they aren't case-sensitive. The -keywords are listed in in this article inthe order that they typically appear +keywords are listed in in this article in the order that they typically appear in a help topic. ### .SYNOPSIS diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_CommonParameters.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_CommonParameters.md index f63be430bc0c..496f77769b7e 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_CommonParameters.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_CommonParameters.md @@ -173,8 +173,8 @@ By default, new error messages overwrite error messages that are already stored in the variable. To append the error message to the variable content, put a plus sign (`+`) before the variable name. -For example, the following command creates the `$a` variable and then stores any -errors in it: +For example, the following command creates the `$a` variable and then stores +any errors in it: ```powershell Get-Process -Id 6 -ErrorVariable a @@ -759,7 +759,7 @@ Mode LastWriteTime Length Name [02]: about_Automatic_Variables.md [03]: about_Preference_Variables.md -[05]: about_functions_advanced.md +[05]: about_Functions_Advanced.md [06]: xref:Microsoft.PowerShell.Utility.Write-Progress [07]: xref:System.Management.Automation.ActionPreference [11]: xref:Microsoft.PowerShell.Utility.Write-Debug diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md index 6dbda308a29d..08f30e985609 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md @@ -680,8 +680,8 @@ Examples: More complex examples: ```powershell -$DomainServers = "ContosoDC1","ContosoDC2","ContosoFileServer","ContosoDNS", - "ContosoDHCP","ContosoWSUS" +$DomainServers = "ContosoDC1", "ContosoDC2", "ContosoFileServer", + "ContosoDNS", "ContosoDHCP", "ContosoWSUS" $thisComputer = "ContosoDC2" $DomainServers -contains $thisComputer @@ -731,8 +731,8 @@ The following examples do the same thing that the examples for `-contains` and More complex examples: ```powershell -$DomainServers = "ContosoDC1","ContosoDC2","ContosoFileServer","ContosoDNS", - "ContosoDHCP","ContosoWSUS" +$DomainServers = "ContosoDC1", "ContosoDC2", "ContosoFileServer", + "ContosoDNS", "ContosoDHCP", "ContosoWSUS" $thisComputer = "ContosoDC2" $thisComputer -in $DomainServers diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Continue.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Continue.md index 413fa90613fb..f3551f7c9713 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Continue.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Continue.md @@ -88,13 +88,13 @@ is **True** and iteration continues with the second `for` loop at `labelB`. ## Using continue in a switch statement An unlabeled `continue` statement within a `switch` terminates execution of the -current `switch` iteration and transfers control to the top of the `switch` to get -the next input item. +current `switch` iteration and transfers control to the top of the `switch` to +get the next input item. -When there is a single input item `continue` exits the entire `switch` statement. -When the `switch` input is a collection, the `switch` tests each element of the -collection. The `continue` exits the current iteration and the `switch` continues -with the next element. +When there is a single input item `continue` exits the entire `switch` +statement. When the `switch` input is a collection, the `switch` tests each +element of the collection. The `continue` exits the current iteration and the +`switch` continues with the next element. ```powershell switch (1,2,3) { From 328af83f93ed4646c49d24220832f23bd766bf81 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Sat, 18 Jan 2025 10:48:52 -0600 Subject: [PATCH 2/4] Update note about MtuSize (#11699) --- .../Test-Connection.md | 9 ++++----- .../Test-Connection.md | 11 +++++------ .../Test-Connection.md | 11 +++++------ 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md index 563cfa7c009c..3a2af316f67b 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 12/01/2023 +ms.date: 01/18/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/test-connection?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Connection @@ -593,10 +593,9 @@ When you use the **Detailed** parameter, this cmdlet returns a ## NOTES -On Linux, using the **BufferSize** parameter or any combination of parameters with the -**MtuSizeDetect** parameter set that results in a non-default buffer size of 32 bytes may require -`sudo`. In those cases, `Test-Command` raises an exception with a message indicating that `sudo` is -required. +On Linux, using the **BufferSize** parameter or any combination of parameters with the **MtuSize** +parameter set that results in a non-default buffer size of 32 bytes may require `sudo`. In those +cases, `Test-Command` raises an exception with a message indicating that `sudo` is required. ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md index 64d25a677bc4..0d8dc33c80de 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2024 +ms.date: 01/18/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/test-connection?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Connection @@ -536,7 +536,7 @@ Accept wildcard characters: False ### -Traceroute -Causes the cmdlet to do a Traceroute test. When this parameter is used, the cmdlet returns a +Causes the cmdlet to do a traceroute test. When this parameter is used, the cmdlet returns a `TestConnectionCommand+TraceStatus` object. ```yaml @@ -593,10 +593,9 @@ When you use the **Detailed** parameter, this cmdlet returns a ## NOTES -On Linux, using the **BufferSize** parameter or any combination of parameters with the -**MtuSizeDetect** parameter set that results in a non-default buffer size of 32 bytes may require -`sudo`. In those cases, `Test-Command` raises an exception with a message indicating that `sudo` is -required. +On Linux, using the **BufferSize** parameter or any combination of parameters with the **MtuSize** +parameter set that results in a non-default buffer size of 32 bytes may require `sudo`. In those +cases, `Test-Command` raises an exception with a message indicating that `sudo` is required. ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md index 96985456414c..23e222548a88 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2024 +ms.date: 01/18/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/test-connection?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Connection @@ -536,7 +536,7 @@ Accept wildcard characters: False ### -Traceroute -Causes the cmdlet to do a Traceroute test. When this parameter is used, the cmdlet returns a +Causes the cmdlet to do a traceroute test. When this parameter is used, the cmdlet returns a `TestConnectionCommand+TraceStatus` object. ```yaml @@ -593,10 +593,9 @@ When you use the **Detailed** parameter, this cmdlet returns a ## NOTES -On Linux, using the **BufferSize** parameter or any combination of parameters with the -**MtuSizeDetect** parameter set that results in a non-default buffer size of 32 bytes may require -`sudo`. In those cases, `Test-Command` raises an exception with a message indicating that `sudo` is -required. +On Linux, using the **BufferSize** parameter or any combination of parameters with the **MtuSize** +parameter set that results in a non-default buffer size of 32 bytes may require `sudo`. In those +cases, `Test-Command` raises an exception with a message indicating that `sudo` is required. ## RELATED LINKS From 2ff03c8bc53fdac03109997b9bb5bc4456f1481e Mon Sep 17 00:00:00 2001 From: surfingoldelephant <151538956+surfingoldelephant@users.noreply.github.com> Date: Sun, 19 Jan 2025 13:49:07 +0000 Subject: [PATCH 3/4] Add missing containment operators to list (#11702) This adds the missing -iin, -cin, -inotin and -incnot operators to the list in about_Comparison_Operators. --- .../About/about_Comparison_Operators.md | 6 +++--- .../About/about_Comparison_Operators.md | 6 +++--- .../About/about_Comparison_Operators.md | 6 +++--- .../About/about_Comparison_Operators.md | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md index 75bbd91a9cbe..d512ef60930c 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md @@ -1,7 +1,7 @@ --- description: Describes the operators that compare values in PowerShell. Locale: en-US -ms.date: 06/06/2024 +ms.date: 01/19/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Comparison_Operators @@ -44,8 +44,8 @@ specified patterns. PowerShell includes the following comparison operators: - `-contains`, `-icontains`, `-ccontains` - collection contains a value - `-notcontains`, `-inotcontains`, `-cnotcontains` - collection doesn't contain a value -- `-in` - value is in a collection -- `-notin` - value isn't in a collection +- `-in`, `-iin`, `-cin` - value is in a collection +- `-notin`, `-inotin`, `-cnotin` - value isn't in a collection **Type** diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md index df4dbe43ea62..b77a671fa161 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md @@ -1,7 +1,7 @@ --- description: Describes the operators that compare values in PowerShell. Locale: en-US -ms.date: 06/06/2024 +ms.date: 01/19/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Comparison_Operators @@ -44,8 +44,8 @@ specified patterns. PowerShell includes the following comparison operators: - `-contains`, `-icontains`, `-ccontains` - collection contains a value - `-notcontains`, `-inotcontains`, `-cnotcontains` - collection doesn't contain a value -- `-in` - value is in a collection -- `-notin` - value isn't in a collection +- `-in`, `-iin`, `-cin` - value is in a collection +- `-notin`, `-inotin`, `-cnotin` - value isn't in a collection **Type** diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md index 08f30e985609..f75e2d18032d 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md @@ -1,7 +1,7 @@ --- description: Describes the operators that compare values in PowerShell. Locale: en-US -ms.date: 06/06/2024 +ms.date: 01/19/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Comparison_Operators @@ -44,8 +44,8 @@ specified patterns. PowerShell includes the following comparison operators: - `-contains`, `-icontains`, `-ccontains` - collection contains a value - `-notcontains`, `-inotcontains`, `-cnotcontains` - collection doesn't contain a value -- `-in` - value is in a collection -- `-notin` - value isn't in a collection +- `-in`, `-iin`, `-cin` - value is in a collection +- `-notin`, `-inotin`, `-cnotin` - value isn't in a collection **Type** diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md index 05d3e6cf92b2..2f3f52ba611d 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md @@ -1,7 +1,7 @@ --- description: Describes the operators that compare values in PowerShell. Locale: en-US -ms.date: 06/06/2024 +ms.date: 01/19/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Comparison_Operators @@ -44,8 +44,8 @@ specified patterns. PowerShell includes the following comparison operators: - `-contains`, `-icontains`, `-ccontains` - collection contains a value - `-notcontains`, `-inotcontains`, `-cnotcontains` - collection doesn't contain a value -- `-in` - value is in a collection -- `-notin` - value isn't in a collection +- `-in`, `-iin`, `-cin` - value is in a collection +- `-notin`, `-inotin`, `-cnotin` - value isn't in a collection **Type** From 6c72518ba837c99ce87d4196f2b4cebcb4085001 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Sun, 19 Jan 2025 15:05:14 -0600 Subject: [PATCH 4/4] Fix index example (#11703) --- .../5.1/Microsoft.PowerShell.Core/About/about_Hash_Tables.md | 4 ++-- .../7.4/Microsoft.PowerShell.Core/About/about_Hash_Tables.md | 4 ++-- .../7.5/Microsoft.PowerShell.Core/About/about_Hash_Tables.md | 5 ++--- .../7.6/Microsoft.PowerShell.Core/About/about_Hash_Tables.md | 5 ++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Hash_Tables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Hash_Tables.md index 8830a0564507..abed1a09a0aa 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Hash_Tables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Hash_Tables.md @@ -1,7 +1,7 @@ --- description: Describes how to create, use, and sort hashtables in PowerShell. Locale: en-US -ms.date: 09/04/2024 +ms.date: 01/19/2025 no-loc: [iDictionary, Hashtable, OrderedDictionary, System.Collections.IDictionary, System.Collections.Hashtable] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -274,7 +274,7 @@ member notation or array index notation. 3 PS> $hash[2] - 2 + two ``` In this example, the key value `2` isn't an index into the collection of diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Hash_Tables.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Hash_Tables.md index b6723a19cae1..5bc627dce2be 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Hash_Tables.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Hash_Tables.md @@ -1,7 +1,7 @@ --- description: Describes how to create, use, and sort hashtables in PowerShell. Locale: en-US -ms.date: 09/04/2024 +ms.date: 01/19/2025 no-loc: [iDictionary, Hashtable, OrderedDictionary, System.Collections.IDictionary, System.Collections.Hashtable] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -274,7 +274,7 @@ member notation or array index notation. 3 PS> $hash[2] - 2 + two ``` In this example, the key value `2` isn't an index into the collection of diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Hash_Tables.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Hash_Tables.md index 6ca6bc42bbca..6ca1f9954947 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Hash_Tables.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Hash_Tables.md @@ -1,7 +1,7 @@ --- description: Describes how to create, use, and sort hashtables in PowerShell. Locale: en-US -ms.date: 09/04/2024 +ms.date: 01/19/2025 no-loc: [iDictionary, Hashtable, OrderedDictionary, System.Collections.IDictionary, System.Collections.Hashtable] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -10,7 +10,6 @@ title: about_Hash_Tables # about_Hash_Tables ## Short description - Describes how to create, use, and sort hashtables in PowerShell. ## Long description @@ -275,7 +274,7 @@ member notation or array index notation. 3 PS> $hash[2] - 2 + two ``` In this example, the key value `2` isn't an index into the collection of diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Hash_Tables.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Hash_Tables.md index 83872fedb151..30d63ccbae39 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Hash_Tables.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Hash_Tables.md @@ -1,7 +1,7 @@ --- description: Describes how to create, use, and sort hashtables in PowerShell. Locale: en-US -ms.date: 09/04/2024 +ms.date: 01/19/2025 no-loc: [iDictionary, Hashtable, OrderedDictionary, System.Collections.IDictionary, System.Collections.Hashtable] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -10,7 +10,6 @@ title: about_Hash_Tables # about_Hash_Tables ## Short description - Describes how to create, use, and sort hashtables in PowerShell. ## Long description @@ -275,7 +274,7 @@ member notation or array index notation. 3 PS> $hash[2] - 2 + two ``` In this example, the key value `2` isn't an index into the collection of