Skip to content

Commit ef38b28

Browse files
authored
Merge pull request #12039 from MicrosoftDocs/main
4/29/2025 PM Publish
2 parents 8a19e90 + 128effc commit ef38b28

File tree

15 files changed

+319
-303
lines changed

15 files changed

+319
-303
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
33
Locale: en-US
4-
ms.date: 12/26/2024
4+
ms.date: 04/29/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Break
@@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:
7979

8080
```powershell
8181
:myLabel while (<condition 1>) {
82-
for ($item in $items) {
82+
foreach ($item in $items) {
8383
if (<condition 2>) {
8484
break myLabel
8585
}

reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 08/29/2023
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/functions/clear-host?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Clear-Host
@@ -38,7 +38,7 @@ might work differently in different host programs.
3838
### Example 1
3939

4040
```powershell
41-
PS> Get-Process
41+
PS> Get-Process | Select-Object -First 5
4242
4343
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4444
------- ------ ----- ----- ----- ------ -- -----------
@@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4747
646 12 2332 4896 49 1.12 388 csrss
4848
189 11 2860 7084 114 0.66 2896 csrss
4949
78 11 1876 4008 42 0.22 4000 csrss
50-
76 7 1848 5064 54 0.08 1028 dwm
51-
610 41 23952 44048 208 4.40 2080 explorer
52-
0 0 0 24 0 0 Idle
53-
182 32 7692 15980 91 0.23 3056 LogonUI
54-
186 25 7832 16068 91 0.27 3996 LogonUI
55-
1272 32 11512 20432 58 25.07 548 lsass
56-
267 10 3536 6736 34 0.80 556 lsm
57-
137 17 3520 7472 61 0.05 1220 msdtc
58-
447 31 70316 84476 201 1,429.67 836 MsMpEng
59-
265 18 7136 15628 134 2.20 3544 msseces
60-
248 16 6476 4076 76 0.22 1592 NisSrv
61-
368 25 61312 65508 614 1.78 848 powershell
62-
101 8 2304 6624 70 0.64 3648 rdpclip
63-
258 15 6804 12156 50 2.65 536 services
64-
...
65-
66-
PS> cls
67-
68-
69-
PS>
70-
```
7150
72-
This command uses the `cls` alias of `Clear-Host` to clear the current display.
51+
PS> Clear-Host
52+
```
7353

7454
## INPUTS
7555

reference/7.4/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
33
Locale: en-US
4-
ms.date: 12/26/2024
4+
ms.date: 04/29/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Break
@@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:
7979

8080
```powershell
8181
:myLabel while (<condition 1>) {
82-
for ($item in $items) {
82+
foreach ($item in $items) {
8383
if (<condition 2>) {
8484
break myLabel
8585
}

reference/7.4/Microsoft.PowerShell.Core/Clear-Host.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 08/29/2023
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Clear-Host
@@ -38,7 +38,7 @@ might work differently in different host programs.
3838
### Example 1
3939

4040
```powershell
41-
PS> Get-Process
41+
PS> Get-Process | Select-Object -First 5
4242
4343
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4444
------- ------ ----- ----- ----- ------ -- -----------
@@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4747
646 12 2332 4896 49 1.12 388 csrss
4848
189 11 2860 7084 114 0.66 2896 csrss
4949
78 11 1876 4008 42 0.22 4000 csrss
50-
76 7 1848 5064 54 0.08 1028 dwm
51-
610 41 23952 44048 208 4.40 2080 explorer
52-
0 0 0 24 0 0 Idle
53-
182 32 7692 15980 91 0.23 3056 LogonUI
54-
186 25 7832 16068 91 0.27 3996 LogonUI
55-
1272 32 11512 20432 58 25.07 548 lsass
56-
267 10 3536 6736 34 0.80 556 lsm
57-
137 17 3520 7472 61 0.05 1220 msdtc
58-
447 31 70316 84476 201 1,429.67 836 MsMpEng
59-
265 18 7136 15628 134 2.20 3544 msseces
60-
248 16 6476 4076 76 0.22 1592 NisSrv
61-
368 25 61312 65508 614 1.78 848 powershell
62-
101 8 2304 6624 70 0.64 3648 rdpclip
63-
258 15 6804 12156 50 2.65 536 services
64-
...
65-
66-
PS> cls
67-
68-
69-
PS>
70-
```
7150
72-
This command uses the `cls` alias of `Clear-Host` to clear the current display.
51+
PS> Clear-Host
52+
```
7353

7454
## INPUTS
7555

reference/7.4/Microsoft.PowerShell.Utility/Test-Json.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 07/24/2024
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/test-json?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Test-Json
@@ -136,20 +136,16 @@ $schema = @'
136136
}
137137
}
138138
'@
139-
'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema
139+
'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema -ErrorAction SilentlyContinue
140140
```
141141

142142
```Output
143-
Test-Json:
144-
Line |
145-
35 | '{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema
146-
| ~~~~~~~~~~~~~~~~~~~~~~~~~
147-
| The JSON is not valid with the schema: Value is "string" but should be "integer" at '/age'
148143
False
149144
```
150145

151-
In this example, we get an error because the schema expects an integer for **age** but the JSON
152-
input we tested uses a string value instead.
146+
In this example, we use the **ErrorAction** parameter to suppres the error message. Without this
147+
parameter the command also outputs an error because the schema expects an integer for **age** but
148+
the JSON input we tested uses a string value instead.
153149

154150
For more information, see [JSON Schema](https://json-schema.org/).
155151

@@ -275,8 +271,8 @@ Accept wildcard characters: True
275271
### -Schema
276272
277273
Specifies a schema to validate the JSON input against. If passed, `Test-Json` validates that the
278-
JSON input conforms to the spec specified by the **Schema** parameter and return `$true` only if the
279-
input conforms to the provided schema.
274+
JSON input conforms to the specification defined by the **Schema** parameter and returns `$true`
275+
only if the input conforms to the provided schema.
280276

281277
For more information, see [JSON Schema](https://json-schema.org/).
282278

reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
33
Locale: en-US
4-
ms.date: 12/26/2024
4+
ms.date: 04/29/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Break
@@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:
7979

8080
```powershell
8181
:myLabel while (<condition 1>) {
82-
for ($item in $items) {
82+
foreach ($item in $items) {
8383
if (<condition 2>) {
8484
break myLabel
8585
}

reference/7.5/Microsoft.PowerShell.Core/Clear-Host.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 08/29/2023
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Clear-Host
@@ -38,7 +38,7 @@ might work differently in different host programs.
3838
### Example 1
3939

4040
```powershell
41-
PS> Get-Process
41+
PS> Get-Process | Select-Object -First 5
4242
4343
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4444
------- ------ ----- ----- ----- ------ -- -----------
@@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4747
646 12 2332 4896 49 1.12 388 csrss
4848
189 11 2860 7084 114 0.66 2896 csrss
4949
78 11 1876 4008 42 0.22 4000 csrss
50-
76 7 1848 5064 54 0.08 1028 dwm
51-
610 41 23952 44048 208 4.40 2080 explorer
52-
0 0 0 24 0 0 Idle
53-
182 32 7692 15980 91 0.23 3056 LogonUI
54-
186 25 7832 16068 91 0.27 3996 LogonUI
55-
1272 32 11512 20432 58 25.07 548 lsass
56-
267 10 3536 6736 34 0.80 556 lsm
57-
137 17 3520 7472 61 0.05 1220 msdtc
58-
447 31 70316 84476 201 1,429.67 836 MsMpEng
59-
265 18 7136 15628 134 2.20 3544 msseces
60-
248 16 6476 4076 76 0.22 1592 NisSrv
61-
368 25 61312 65508 614 1.78 848 powershell
62-
101 8 2304 6624 70 0.64 3648 rdpclip
63-
258 15 6804 12156 50 2.65 536 services
64-
...
65-
66-
PS> cls
67-
68-
69-
PS>
70-
```
7150
72-
This command uses the `cls` alias of `Clear-Host` to clear the current display.
51+
PS> Clear-Host
52+
```
7353

7454
## INPUTS
7555

reference/7.5/Microsoft.PowerShell.Utility/Test-Json.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 07/24/2024
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/test-json?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Test-Json
@@ -142,20 +142,16 @@ $schema = @'
142142
}
143143
}
144144
'@
145-
'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema
145+
'{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema -ErrorAction SilentlyContinue
146146
```
147147

148148
```Output
149-
Test-Json:
150-
Line |
151-
35 | '{"name": "Ashley", "age": "25"}' | Test-Json -Schema $schema
152-
| ~~~~~~~~~~~~~~~~~~~~~~~~~
153-
| The JSON is not valid with the schema: Value is "string" but should be "integer" at '/age'
154149
False
155150
```
156151

157-
In this example, we get an error because the schema expects an integer for **age** but the JSON
158-
input we tested uses a string value instead.
152+
In this example, we use the **ErrorAction** parameter to suppres the error message. Without this
153+
parameter the command also outputs an error because the schema expects an integer for **age** but
154+
the JSON input we tested uses a string value instead.
159155

160156
For more information, see [JSON Schema](https://json-schema.org/).
161157

reference/7.6/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes a statement you can use to immediately exit `foreach`, `for`, `while`, `do`, `switch`, or `trap` statements.
33
Locale: en-US
4-
ms.date: 12/26/2024
4+
ms.date: 04/29/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_break?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Break
@@ -79,7 +79,7 @@ example has a `while` statement with a `for` statement:
7979

8080
```powershell
8181
:myLabel while (<condition 1>) {
82-
for ($item in $items) {
82+
foreach ($item in $items) {
8383
if (<condition 2>) {
8484
break myLabel
8585
}
@@ -132,7 +132,7 @@ specific condition:
132132

133133
```powershell
134134
$var = "word2"
135-
switch -regex ($var) {
135+
switch -Regex ($var) {
136136
"word2" {
137137
Write-Host "Exact" $_
138138
break

reference/7.6/Microsoft.PowerShell.Core/Clear-Host.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: System.Management.Automation.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Core
5-
ms.date: 08/29/2023
5+
ms.date: 04/29/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/clear-host?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Clear-Host
@@ -38,7 +38,7 @@ might work differently in different host programs.
3838
### Example 1
3939

4040
```powershell
41-
PS> Get-Process
41+
PS> Get-Process | Select-Object -First 5
4242
4343
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4444
------- ------ ----- ----- ----- ------ -- -----------
@@ -47,29 +47,9 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
4747
646 12 2332 4896 49 1.12 388 csrss
4848
189 11 2860 7084 114 0.66 2896 csrss
4949
78 11 1876 4008 42 0.22 4000 csrss
50-
76 7 1848 5064 54 0.08 1028 dwm
51-
610 41 23952 44048 208 4.40 2080 explorer
52-
0 0 0 24 0 0 Idle
53-
182 32 7692 15980 91 0.23 3056 LogonUI
54-
186 25 7832 16068 91 0.27 3996 LogonUI
55-
1272 32 11512 20432 58 25.07 548 lsass
56-
267 10 3536 6736 34 0.80 556 lsm
57-
137 17 3520 7472 61 0.05 1220 msdtc
58-
447 31 70316 84476 201 1,429.67 836 MsMpEng
59-
265 18 7136 15628 134 2.20 3544 msseces
60-
248 16 6476 4076 76 0.22 1592 NisSrv
61-
368 25 61312 65508 614 1.78 848 powershell
62-
101 8 2304 6624 70 0.64 3648 rdpclip
63-
258 15 6804 12156 50 2.65 536 services
64-
...
65-
66-
PS> cls
67-
68-
69-
PS>
70-
```
7150
72-
This command uses the `cls` alias of `Clear-Host` to clear the current display.
51+
PS> Clear-Host
52+
```
7353

7454
## INPUTS
7555

0 commit comments

Comments
 (0)