diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md index 1091a7340ed2..814e7bf7e2e1 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md @@ -1,7 +1,7 @@ --- description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements. Locale: en-US -ms.date: 12/26/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Break @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement: ```powershell :myLabel while () { - for ($item in $items) { + foreach ($item in $items) { if () { break myLabel } diff --git a/reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md b/reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md index 90a9fda6ee89..6b27a9157756 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md @@ -2,7 +2,7 @@ external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core -ms.date: 08/29/2023 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/functions/clear-host?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: Clear-Host @@ -38,7 +38,7 @@ might work differently in different host programs. ### Example 1 ```powershell -PS> Get-Process +PS> Get-Process | Select-Object -First 5 Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- @@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName 646 12 2332 4896 49 1.12 388 csrss 189 11 2860 7084 114 0.66 2896 csrss 78 11 1876 4008 42 0.22 4000 csrss - 76 7 1848 5064 54 0.08 1028 dwm - 610 41 23952 44048 208 4.40 2080 explorer - 0 0 0 24 0 0 Idle - 182 32 7692 15980 91 0.23 3056 LogonUI - 186 25 7832 16068 91 0.27 3996 LogonUI - 1272 32 11512 20432 58 25.07 548 lsass - 267 10 3536 6736 34 0.80 556 lsm - 137 17 3520 7472 61 0.05 1220 msdtc - 447 31 70316 84476 201 1,429.67 836 MsMpEng - 265 18 7136 15628 134 2.20 3544 msseces - 248 16 6476 4076 76 0.22 1592 NisSrv - 368 25 61312 65508 614 1.78 848 powershell - 101 8 2304 6624 70 0.64 3648 rdpclip - 258 15 6804 12156 50 2.65 536 services -... - -PS> cls - - -PS> -``` -This command uses the `cls` alias of `Clear-Host` to clear the current display. +PS> Clear-Host +``` ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Break.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Break.md index af39e4288e7c..d838fccf6ec2 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Break.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Break.md @@ -1,7 +1,7 @@ --- description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements. Locale: en-US -ms.date: 12/26/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Break @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement: ```powershell :myLabel while () { - for ($item in $items) { + foreach ($item in $items) { if () { break myLabel } diff --git a/reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md b/reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md index 093241c27a05..8f2fd1fbd842 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md +++ b/reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md @@ -2,7 +2,7 @@ external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core -ms.date: 08/29/2023 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Clear-Host @@ -38,7 +38,7 @@ might work differently in different host programs. ### Example 1 ```powershell -PS> Get-Process +PS> Get-Process | Select-Object -First 5 Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- @@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName 646 12 2332 4896 49 1.12 388 csrss 189 11 2860 7084 114 0.66 2896 csrss 78 11 1876 4008 42 0.22 4000 csrss - 76 7 1848 5064 54 0.08 1028 dwm - 610 41 23952 44048 208 4.40 2080 explorer - 0 0 0 24 0 0 Idle - 182 32 7692 15980 91 0.23 3056 LogonUI - 186 25 7832 16068 91 0.27 3996 LogonUI - 1272 32 11512 20432 58 25.07 548 lsass - 267 10 3536 6736 34 0.80 556 lsm - 137 17 3520 7472 61 0.05 1220 msdtc - 447 31 70316 84476 201 1,429.67 836 MsMpEng - 265 18 7136 15628 134 2.20 3544 msseces - 248 16 6476 4076 76 0.22 1592 NisSrv - 368 25 61312 65508 614 1.78 848 powershell - 101 8 2304 6624 70 0.64 3648 rdpclip - 258 15 6804 12156 50 2.65 536 services -... - -PS> cls - - -PS> -``` -This command uses the `cls` alias of `Clear-Host` to clear the current display. +PS> Clear-Host +``` ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md b/reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md index 3390b21b0400..e1ed5c0a0cc6 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 07/24/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/test-json?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Json @@ -136,20 +136,16 @@ $schema = @' } } '@ -'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema +'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema -ErrorAction SilentlyContinue ``` ```Output -Test-Json: -Line | - 35 | '{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema - | ~~~~~~~~~~~~~~~~~~~~~~~~~ - | The JSON is not valid with the schema: Value is "string" but should be "integer" at '/age' False ``` -In this example, we get an error because the schema expects an integer for **age** but the JSON -input we tested uses a string value instead. +In this example, we use the **ErrorAction** parameter to suppres the error message. Without this +parameter the command also outputs an error because the schema expects an integer for **age** but +the JSON input we tested uses a string value instead. For more information, see [JSON Schema](https://json-schema.org/). @@ -275,8 +271,8 @@ Accept wildcard characters: True ### -Schema Specifies a schema to validate the JSON input against. If passed, `Test-Json` validates that the -JSON input conforms to the spec specified by the **Schema** parameter and return `$true` only if the -input conforms to the provided schema. +JSON input conforms to the specification defined by the **Schema** parameter and returns `$true` +only if the input conforms to the provided schema. For more information, see [JSON Schema](https://json-schema.org/). 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 892d4e94914b..4469cb6cb53d 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md @@ -1,7 +1,7 @@ --- description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements. Locale: en-US -ms.date: 12/26/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Break @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement: ```powershell :myLabel while () { - for ($item in $items) { + foreach ($item in $items) { if () { break myLabel } diff --git a/reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md b/reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md index 7ec13f403335..f0c2f7d498ee 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md +++ b/reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md @@ -2,7 +2,7 @@ external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core -ms.date: 08/29/2023 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Clear-Host @@ -38,7 +38,7 @@ might work differently in different host programs. ### Example 1 ```powershell -PS> Get-Process +PS> Get-Process | Select-Object -First 5 Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- @@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName 646 12 2332 4896 49 1.12 388 csrss 189 11 2860 7084 114 0.66 2896 csrss 78 11 1876 4008 42 0.22 4000 csrss - 76 7 1848 5064 54 0.08 1028 dwm - 610 41 23952 44048 208 4.40 2080 explorer - 0 0 0 24 0 0 Idle - 182 32 7692 15980 91 0.23 3056 LogonUI - 186 25 7832 16068 91 0.27 3996 LogonUI - 1272 32 11512 20432 58 25.07 548 lsass - 267 10 3536 6736 34 0.80 556 lsm - 137 17 3520 7472 61 0.05 1220 msdtc - 447 31 70316 84476 201 1,429.67 836 MsMpEng - 265 18 7136 15628 134 2.20 3544 msseces - 248 16 6476 4076 76 0.22 1592 NisSrv - 368 25 61312 65508 614 1.78 848 powershell - 101 8 2304 6624 70 0.64 3648 rdpclip - 258 15 6804 12156 50 2.65 536 services -... - -PS> cls - - -PS> -``` -This command uses the `cls` alias of `Clear-Host` to clear the current display. +PS> Clear-Host +``` ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md b/reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md index 3001d2a38055..86a42df7b32d 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 07/24/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/test-json?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Json @@ -142,20 +142,16 @@ $schema = @' } } '@ -'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema +'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema -ErrorAction SilentlyContinue ``` ```Output -Test-Json: -Line | - 35 | '{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema - | ~~~~~~~~~~~~~~~~~~~~~~~~~ - | The JSON is not valid with the schema: Value is "string" but should be "integer" at '/age' False ``` -In this example, we get an error because the schema expects an integer for **age** but the JSON -input we tested uses a string value instead. +In this example, we use the **ErrorAction** parameter to suppres the error message. Without this +parameter the command also outputs an error because the schema expects an integer for **age** but +the JSON input we tested uses a string value instead. For more information, see [JSON Schema](https://json-schema.org/). diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Break.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Break.md index c23c711a2e5a..2e97e507856e 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Break.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Break.md @@ -1,7 +1,7 @@ --- description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements. Locale: en-US -ms.date: 12/26/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Break @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement: ```powershell :myLabel while () { - for ($item in $items) { + foreach ($item in $items) { if () { break myLabel } @@ -132,7 +132,7 @@ specific condition: ```powershell $var = "word2" -switch -regex ($var) { +switch -Regex ($var) { "word2" { Write-Host "Exact" $_ break diff --git a/reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md b/reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md index fa655af0113a..c35b630422be 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md +++ b/reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md @@ -2,7 +2,7 @@ external help file: System.Management.Automation.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Core -ms.date: 08/29/2023 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Clear-Host @@ -38,7 +38,7 @@ might work differently in different host programs. ### Example 1 ```powershell -PS> Get-Process +PS> Get-Process | Select-Object -First 5 Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- @@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName 646 12 2332 4896 49 1.12 388 csrss 189 11 2860 7084 114 0.66 2896 csrss 78 11 1876 4008 42 0.22 4000 csrss - 76 7 1848 5064 54 0.08 1028 dwm - 610 41 23952 44048 208 4.40 2080 explorer - 0 0 0 24 0 0 Idle - 182 32 7692 15980 91 0.23 3056 LogonUI - 186 25 7832 16068 91 0.27 3996 LogonUI - 1272 32 11512 20432 58 25.07 548 lsass - 267 10 3536 6736 34 0.80 556 lsm - 137 17 3520 7472 61 0.05 1220 msdtc - 447 31 70316 84476 201 1,429.67 836 MsMpEng - 265 18 7136 15628 134 2.20 3544 msseces - 248 16 6476 4076 76 0.22 1592 NisSrv - 368 25 61312 65508 614 1.78 848 powershell - 101 8 2304 6624 70 0.64 3648 rdpclip - 258 15 6804 12156 50 2.65 536 services -... - -PS> cls - - -PS> -``` -This command uses the `cls` alias of `Clear-Host` to clear the current display. +PS> Clear-Host +``` ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Test-Json.md b/reference/7.6/Microsoft.PowerShell.Utility/Test-Json.md index 47499b1a12af..2e5e9dc6a4b4 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Test-Json.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Test-Json.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 07/24/2024 +ms.date: 04/29/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/test-json?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Test-Json @@ -142,20 +142,16 @@ $schema = @' } } '@ -'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema +'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema -ErrorAction SilentlyContinue ``` ```Output -Test-Json: -Line | - 35 | '{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema - | ~~~~~~~~~~~~~~~~~~~~~~~~~ - | The JSON is not valid with the schema: Value is "string" but should be "integer" at '/age' False ``` -In this example, we get an error because the schema expects an integer for **age** but the JSON -input we tested uses a string value instead. +In this example, we use the **ErrorAction** parameter to suppres the error message. Without this +parameter the command also outputs an error because the schema expects an integer for **age** but +the JSON input we tested uses a string value instead. For more information, see [JSON Schema](https://json-schema.org/). diff --git a/reference/docs-conceptual/community/contributing/general-markdown.md b/reference/docs-conceptual/community/contributing/general-markdown.md index e0785cace3e1..5466de8f9225 100644 --- a/reference/docs-conceptual/community/contributing/general-markdown.md +++ b/reference/docs-conceptual/community/contributing/general-markdown.md @@ -1,6 +1,6 @@ --- description: This article provides specific guidance for using Markdown in our documentation. -ms.date: 03/30/2025 +ms.date: 04/29/2025 title: Markdown best practices --- # Markdown best practices @@ -8,10 +8,10 @@ title: Markdown best practices This article provides specific guidance for using Markdown in our documentation. It isn't a tutorial for Markdown. If you need a tutorial for Markdown, see this [Markdown cheatsheet][12]. -The Microsoft Open Publishing System (OPS) that builds our documentation uses [markdig][06] to -process the Markdown documents. Markdig parses the documents based on the rules of the latest -[CommonMark][10] specification. OPS follows the CommonMark specification and adds some extensions -for platform-specific features, such as tables and alerts. +The build pipeline that builds our documentation uses [markdig][06] to process the Markdown +documents. Markdig parses the documents based on the rules of the latest [CommonMark][10] +specification. OPS follows the CommonMark specification and adds some extensions for +platform-specific features, such as tables and alerts. The CommonMark specification is stricter about the construction of some Markdown elements. Pay close attention to the details provided in this document. diff --git a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md index 695cff6ce7b6..a63ac3aae790 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md @@ -1,6 +1,6 @@ --- description: Information about installing PowerShell on macOS -ms.date: 04/28/2025 +ms.date: 04/29/2025 title: Installing PowerShell on macOS --- @@ -37,7 +37,7 @@ Once `brew` is installed you can install PowerShell. The following command installs the latest stable release of PowerShell: ```sh -brew install powershell/tap/powershell +brew install --cask powershell ``` Finally, verify that your install is working properly: diff --git a/reference/includes/ubuntu-support.md b/reference/includes/ubuntu-support.md index 224bb949bb34..99c483df52e3 100644 --- a/reference/includes/ubuntu-support.md +++ b/reference/includes/ubuntu-support.md @@ -1,7 +1,7 @@ --- author: sdwheeler ms.author: sewhee -ms.date: 11/02/2024 +ms.date: 04/29/2025 ms.topic: include --- @@ -15,7 +15,7 @@ from the [Microsoft Artifact Registry][mcr] for the following versions of Ubuntu - Ubuntu 24.04 (Noble Numbat) - OS support ends on 2029-04-01 - Ubuntu 22.04 (Jammy Jellyfish) - OS support ends on 2027-04-01 -- Ubuntu 20.04 (Focal Fossa) - OS support ends on 2025-04-02 +- Ubuntu 20.04 (Focal Fossa) - OS support ends on 2025-05-31 Ubuntu 24.10 (Oracular Oriole) is an interim release. Microsoft doesn't support [interim releases][interim] of Ubuntu. For more information, see