Skip to content

Commit dd0db01

Browse files
Merge pull request #12352 from MicrosoftDocs/main
Auto Publish – main to live - 2025-09-11 22:00 UTC
2 parents 7bb8c23 + f23715d commit dd0db01

6 files changed

Lines changed: 101 additions & 50 deletions

File tree

reference/5.1/Microsoft.PowerShell.Utility/Compare-Object.md

Lines changed: 26 additions & 10 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: 06/11/2024
5+
ms.date: 09/11/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -54,12 +54,15 @@ with each value on a separate line.
5454
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
5555
- `Testfile2.txt` contains the values: cat, bird, and racoon.
5656

57-
The output displays only the lines that are different between the files. `Testfile1.txt` is the
58-
**reference** object (`<=`) and `Testfile2.txt`is the **difference** object (`=>`). Lines with
59-
content that appear in both files aren't displayed.
57+
The output displays only the lines that are different between the files. Lines with content that
58+
appear in both files aren't displayed.
6059

6160
```powershell
62-
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
61+
$objects = @{
62+
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
63+
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
64+
}
65+
Compare-Object @objects
6366
```
6467

6568
```Output
@@ -71,13 +74,21 @@ dog <=
7174
squirrel <=
7275
```
7376

77+
For this example, the output shows the following information
78+
79+
- `cat` and `racoon` are found in the difference object file, but missing from the reference object
80+
file
81+
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
82+
object file
83+
7484
### Example 2 - Compare each line of content and exclude the differences
7585

76-
This example uses the **IncludeEqual** and **ExcludeDifferent** parameters to compare each line of
77-
content in two text files.
86+
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
87+
files.
7888

79-
Because the command uses the **ExcludeDifferent** parameter, the output only contains lines
80-
contained in both files, as shown by the **SideIndicator** (`==`).
89+
As of PowerShell 7.1, when using the **ExcludeDifferent** parameter, **IncludeEqual** is inferred
90+
and the output only contains lines contained in both files, as shown by the **SideIndicator**
91+
(`==`).
8192

8293
```powershell
8394
$objects = @{
@@ -176,7 +187,12 @@ output displayed by the default format for **System.Boolean** objects didn't dis
176187
In this example, we compare two different string that have the same length.
177188

178189
```powershell
179-
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
190+
$objects = @{
191+
ReferenceObject = 'abc'
192+
DifferenceObject = 'xyz'
193+
Property = 'Length'
194+
}
195+
Compare-Object @objects -IncludeEqual
180196
```
181197

182198
```Output

reference/7.4/Microsoft.PowerShell.Utility/Compare-Object.md

Lines changed: 25 additions & 10 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: 06/11/2024
5+
ms.date: 09/11/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -20,8 +20,8 @@ Compares two sets of objects.
2020

2121
```
2222
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
23-
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual] [-PassThru]
24-
[-Culture <String>] [-CaseSensitive] [<CommonParameters>]
23+
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual]
24+
[-PassThru] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
2525
```
2626

2727
## DESCRIPTION
@@ -54,12 +54,15 @@ with each value on a separate line.
5454
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
5555
- `Testfile2.txt` contains the values: cat, bird, and racoon.
5656

57-
The output displays only the lines that are different between the files. `Testfile1.txt` is the
58-
**reference** object (`<=`) and `Testfile2.txt`is the **difference** object (`=>`). Lines with
59-
content that appear in both files aren't displayed.
57+
The output displays only the lines that are different between the files. Lines with content that
58+
appear in both files aren't displayed.
6059

6160
```powershell
62-
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
61+
$objects = @{
62+
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
63+
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
64+
}
65+
Compare-Object @objects
6366
```
6467

6568
```Output
@@ -71,10 +74,17 @@ dog <=
7174
squirrel <=
7275
```
7376

77+
For this example, the output shows the following information
78+
79+
- `cat` and `racoon` are found in the difference object file, but missing from the reference object
80+
file
81+
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
82+
object file
83+
7484
### Example 2 - Compare each line of content and exclude the differences
7585

76-
This example uses the **ExcludeDifferent** parameter to compare each line of
77-
content in two text files.
86+
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
87+
files.
7888

7989
As of PowerShell 7.1, when using the **ExcludeDifferent** parameter, **IncludeEqual** is inferred
8090
and the output only contains lines contained in both files, as shown by the **SideIndicator**
@@ -177,7 +187,12 @@ output displayed by the default format for **System.Boolean** objects didn't dis
177187
In this example, we compare two different string that have the same length.
178188

179189
```powershell
180-
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
190+
$objects = @{
191+
ReferenceObject = 'abc'
192+
DifferenceObject = 'xyz'
193+
Property = 'Length'
194+
}
195+
Compare-Object @objects -IncludeEqual
181196
```
182197

183198
```Output

reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.md

Lines changed: 12 additions & 6 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: 06/11/2024
5+
ms.date: 09/11/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -54,9 +54,8 @@ with each value on a separate line.
5454
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
5555
- `Testfile2.txt` contains the values: cat, bird, and racoon.
5656

57-
The output displays only the lines that are different between the files. `Testfile1.txt` is the
58-
**reference** object (`<=`) and `Testfile2.txt`is the **difference** object (`=>`). Lines with
59-
content that appear in both files aren't displayed.
57+
The output displays only the lines that are different between the files. Lines with content that
58+
appear in both files aren't displayed.
6059

6160
```powershell
6261
$objects = @{
@@ -75,10 +74,17 @@ dog <=
7574
squirrel <=
7675
```
7776

77+
For this example, the output shows the following information
78+
79+
- `cat` and `racoon` are found in the difference object file, but missing from the reference object
80+
file
81+
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
82+
object file
83+
7884
### Example 2 - Compare each line of content and exclude the differences
7985

80-
This example uses the **ExcludeDifferent** parameter to compare each line of
81-
content in two text files.
86+
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
87+
files.
8288

8389
As of PowerShell 7.1, when using the **ExcludeDifferent** parameter, **IncludeEqual** is inferred
8490
and the output only contains lines contained in both files, as shown by the **SideIndicator**

reference/7.6/Microsoft.PowerShell.Utility/Compare-Object.md

Lines changed: 25 additions & 10 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: 06/11/2024
5+
ms.date: 09/11/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -20,8 +20,8 @@ Compares two sets of objects.
2020

2121
```
2222
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
23-
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual] [-PassThru]
24-
[-Culture <String>] [-CaseSensitive] [<CommonParameters>]
23+
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual]
24+
[-PassThru] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
2525
```
2626

2727
## DESCRIPTION
@@ -54,12 +54,15 @@ with each value on a separate line.
5454
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
5555
- `Testfile2.txt` contains the values: cat, bird, and racoon.
5656

57-
The output displays only the lines that are different between the files. `Testfile1.txt` is the
58-
**reference** object (`<=`) and `Testfile2.txt`is the **difference** object (`=>`). Lines with
59-
content that appear in both files aren't displayed.
57+
The output displays only the lines that are different between the files. Lines with content that
58+
appear in both files aren't displayed.
6059

6160
```powershell
62-
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
61+
$objects = @{
62+
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
63+
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
64+
}
65+
Compare-Object @objects
6366
```
6467

6568
```Output
@@ -71,10 +74,17 @@ dog <=
7174
squirrel <=
7275
```
7376

77+
For this example, the output shows the following information
78+
79+
- `cat` and `racoon` are found in the difference object file, but missing from the reference object
80+
file
81+
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
82+
object file
83+
7484
### Example 2 - Compare each line of content and exclude the differences
7585

76-
This example uses the **ExcludeDifferent** parameter to compare each line of
77-
content in two text files.
86+
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
87+
files.
7888

7989
As of PowerShell 7.1, when using the **ExcludeDifferent** parameter, **IncludeEqual** is inferred
8090
and the output only contains lines contained in both files, as shown by the **SideIndicator**
@@ -177,7 +187,12 @@ output displayed by the default format for **System.Boolean** objects didn't dis
177187
In this example, we compare two different string that have the same length.
178188

179189
```powershell
180-
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
190+
$objects = @{
191+
ReferenceObject = 'abc'
192+
DifferenceObject = 'xyz'
193+
Property = 'Length'
194+
}
195+
Compare-Object @objects -IncludeEqual
181196
```
182197

183198
```Output

reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-74.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: What's New in PowerShell 7.4
33
description: New features and changes released in PowerShell 7.4
4-
ms.date: 06/16/2025
4+
ms.date: 09/11/2025
55
---
66

77
# What's New in PowerShell 7.4
88

9-
PowerShell 7.4.11 includes the following features, updates, and breaking changes. PowerShell 7.4.10
10-
is built on .NET 8.0.411.
9+
PowerShell 7.4.12 includes the following features, updates, and breaking changes. PowerShell 7.4.12
10+
is built on .NET 8.0.413.
1111

1212
For a complete list of changes, see the [CHANGELOG][chg] in the GitHub repository.
1313

@@ -41,11 +41,11 @@ For more information, see [Install the msi package from the command line][01].
4141

4242
## Updated versions of PSResourceGet and PSReadLine
4343

44-
PowerShell 7.4 includes **Microsoft.PowerShell.PSResourceGet** v1.0.1. This module is installed
44+
PowerShell 7.4 includes **Microsoft.PowerShell.PSResourceGet** v1.1.1. This module is installed
4545
side-by-side with **PowerShellGet** v2.2.5 and **PackageManagement** v1.4.8.1. For more information,
4646
see the documentation for [Microsoft.PowerShell.PSResourceGet][12].
4747

48-
PowerShell 7.4 now includes **PSReadLine** v2.3.4. For more information, see the documentation for
48+
PowerShell 7.4 now includes **PSReadLine** v2.3.6. For more information, see the documentation for
4949
[PSReadLine][13].
5050

5151
## Tab completion improvements

reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-75.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: What's New in PowerShell 7.5
33
description: New features and changes released in PowerShell 7.5
4-
ms.date: 06/16/2025
4+
ms.date: 09/11/2025
55
---
66

77
# What's New in PowerShell 7.5
88

9-
PowerShell 7.5.2 includes the following features, updates, and breaking changes. PowerShell
10-
7.5 is built on .NET 9.0.301 release.
9+
PowerShell 7.5.3 includes the following features, updates, and breaking changes. PowerShell
10+
7.5 is built on .NET 9.0.304 release.
1111

1212
For a complete list of changes, see the [CHANGELOG][chg] in the GitHub repository. For more
1313
information about .NET 9, see [What's new in .NET 9][07].
@@ -22,15 +22,12 @@ information about .NET 9, see [What's new in .NET 9][07].
2222
- The Windows installer now remembers installation options used and uses them to initialize options
2323
for the next installation ([#20420][20420]) (Thanks @reduckted!)
2424
- `ConvertTo-Json` now serializes `BigInteger` as a number ([#21000][21000]) (Thanks @jborean93!)
25-
- .NET 9 removed the `BinaryFormatter` implementation causing a regression in the `Out-GridView`
26-
cmdlet. The search feature of `Out-GridView` doesn't work in PowerShell 7.5. This problem is
27-
tracked in [Issue #24749][24749].
2825

2926
## Updated modules
3027

31-
PowerShell 7.5.0 includes the following updated modules:
28+
PowerShell 7.5.3 includes the following updated modules:
3229

33-
- **Microsoft.PowerShell.PSResourceGet** v1.1.0
30+
- **Microsoft.PowerShell.PSResourceGet** v1.1.1
3431
- **PSReadLine** v2.3.6
3532

3633
## Tab completion improvements
@@ -72,6 +69,8 @@ Many thanks to **@ArmaanMcleod** and others for all their work to improve tab co
7269

7370
## Other cmdlet improvements
7471

72+
- Fix `Out-GridView` by replacing the use of obsolete `BinaryFormatter` with custom implementation
73+
([#25559][25559])
7574
- Enable `-NoRestart` to work with `Register-PSSessionConfiguration` ([#23891][23891])
7675
- Add `IgnoreComments` and `AllowTrailingCommas` options to `Test-Json` cmdlet ([#23817][23817])
7776
(Thanks @ArmaanMcleod!)
@@ -341,10 +340,10 @@ CollectionSize Test TotalMilliseconds RelativeSpeed
341340
[24115]: https://github.com/PowerShell/PowerShell/pull/24115
342341
[24228]: https://github.com/PowerShell/PowerShell/pull/24228
343342
[24236]: https://github.com/PowerShell/PowerShell/pull/24236
344-
[24749]: https://github.com/PowerShell/PowerShell/issues/24749
345343
[25305]: https://github.com/PowerShell/PowerShell/pull/25305
346344
[25306]: https://github.com/PowerShell/PowerShell/pull/25306
347345
[25324]: https://github.com/PowerShell/PowerShell/pull/25324
348346
[25330]: https://github.com/PowerShell/PowerShell/pull/25330
349347
[25357]: https://github.com/PowerShell/PowerShell/pull/25357
350348
[25547]: https://github.com/PowerShell/PowerShell/pull/25547
349+
[25559]: https://github.com/PowerShell/PowerShell/pull/25559

0 commit comments

Comments
 (0)