Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:

```powershell
:myLabel while (<condition 1>) {
for ($item in $items) {
foreach ($item in $items) {
if (<condition 2>) {
break myLabel
}
Expand Down
28 changes: 4 additions & 24 deletions reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
------- ------ ----- ----- ----- ------ -- -----------
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:

```powershell
:myLabel while (<condition 1>) {
for ($item in $items) {
foreach ($item in $items) {
if (<condition 2>) {
break myLabel
}
Expand Down
28 changes: 4 additions & 24 deletions reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
------- ------ ----- ----- ----- ------ -- -----------
Expand All @@ -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

Expand Down
18 changes: 7 additions & 11 deletions reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/).

Expand Down Expand Up @@ -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/).

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:

```powershell
:myLabel while (<condition 1>) {
for ($item in $items) {
foreach ($item in $items) {
if (<condition 2>) {
break myLabel
}
Expand Down
28 changes: 4 additions & 24 deletions reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
------- ------ ----- ----- ----- ------ -- -----------
Expand All @@ -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

Expand Down
14 changes: 5 additions & 9 deletions reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/).

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:

```powershell
:myLabel while (<condition 1>) {
for ($item in $items) {
foreach ($item in $items) {
if (<condition 2>) {
break myLabel
}
Expand Down Expand Up @@ -132,7 +132,7 @@ specific condition:

```powershell
$var = "word2"
switch -regex ($var) {
switch -Regex ($var) {
"word2" {
Write-Host "Exact" $_
break
Expand Down
28 changes: 4 additions & 24 deletions reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
------- ------ ----- ----- ----- ------ -- -----------
Expand All @@ -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

Expand Down
14 changes: 5 additions & 9 deletions reference/7.6/Microsoft.PowerShell.Utility/Test-Json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/).

Expand Down
Loading