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
36 changes: 26 additions & 10 deletions reference/5.1/Microsoft.PowerShell.Utility/Compare-Object.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: 06/11/2024
ms.date: 09/11/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -54,12 +54,15 @@ with each value on a separate line.
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
- `Testfile2.txt` contains the values: cat, bird, and racoon.

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

```powershell
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
$objects = @{
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
}
Compare-Object @objects
```

```Output
Expand All @@ -71,13 +74,21 @@ dog <=
squirrel <=
```

For this example, the output shows the following information

- `cat` and `racoon` are found in the difference object file, but missing from the reference object
file
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
object file

### Example 2 - Compare each line of content and exclude the differences

This example uses the **IncludeEqual** and **ExcludeDifferent** parameters to compare each line of
content in two text files.
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
files.

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

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

```powershell
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
$objects = @{
ReferenceObject = 'abc'
DifferenceObject = 'xyz'
Property = 'Length'
}
Compare-Object @objects -IncludeEqual
```

```Output
Expand Down
35 changes: 25 additions & 10 deletions reference/7.4/Microsoft.PowerShell.Utility/Compare-Object.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: 06/11/2024
ms.date: 09/11/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand All @@ -20,8 +20,8 @@ Compares two sets of objects.

```
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual] [-PassThru]
[-Culture <String>] [-CaseSensitive] [<CommonParameters>]
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual]
[-PassThru] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
```

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

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

```powershell
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
$objects = @{
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
}
Compare-Object @objects
```

```Output
Expand All @@ -71,10 +74,17 @@ dog <=
squirrel <=
```

For this example, the output shows the following information

- `cat` and `racoon` are found in the difference object file, but missing from the reference object
file
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
object file

### Example 2 - Compare each line of content and exclude the differences

This example uses the **ExcludeDifferent** parameter to compare each line of
content in two text files.
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
files.

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

```powershell
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
$objects = @{
ReferenceObject = 'abc'
DifferenceObject = 'xyz'
Property = 'Length'
}
Compare-Object @objects -IncludeEqual
```

```Output
Expand Down
18 changes: 12 additions & 6 deletions reference/7.5/Microsoft.PowerShell.Utility/Compare-Object.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: 06/11/2024
ms.date: 09/11/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand Down Expand Up @@ -54,9 +54,8 @@ with each value on a separate line.
- `Testfile1.txt` contains the values: dog, squirrel, and bird.
- `Testfile2.txt` contains the values: cat, bird, and racoon.

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

```powershell
$objects = @{
Expand All @@ -75,10 +74,17 @@ dog <=
squirrel <=
```

For this example, the output shows the following information

- `cat` and `racoon` are found in the difference object file, but missing from the reference object
file
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
object file

### Example 2 - Compare each line of content and exclude the differences

This example uses the **ExcludeDifferent** parameter to compare each line of
content in two text files.
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
files.

As of PowerShell 7.1, when using the **ExcludeDifferent** parameter, **IncludeEqual** is inferred
and the output only contains lines contained in both files, as shown by the **SideIndicator**
Expand Down
35 changes: 25 additions & 10 deletions reference/7.6/Microsoft.PowerShell.Utility/Compare-Object.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: 06/11/2024
ms.date: 09/11/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand All @@ -20,8 +20,8 @@ Compares two sets of objects.

```
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual] [-PassThru]
[-Culture <String>] [-CaseSensitive] [<CommonParameters>]
[-SyncWindow <Int32>] [-Property <Object[]>] [-ExcludeDifferent] [-IncludeEqual]
[-PassThru] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
```

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

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

```powershell
Compare-Object -ReferenceObject (Get-Content -Path C:\Test\Testfile1.txt) -DifferenceObject (Get-Content -Path C:\Test\Testfile2.txt)
$objects = @{
ReferenceObject = (Get-Content -Path C:\Test\Testfile1.txt)
DifferenceObject = (Get-Content -Path C:\Test\Testfile2.txt)
}
Compare-Object @objects
```

```Output
Expand All @@ -71,10 +74,17 @@ dog <=
squirrel <=
```

For this example, the output shows the following information

- `cat` and `racoon` are found in the difference object file, but missing from the reference object
file
- `dog` and `squirrel` are found in the reference object file, but missing from the difference
object file

### Example 2 - Compare each line of content and exclude the differences

This example uses the **ExcludeDifferent** parameter to compare each line of
content in two text files.
This example uses the **ExcludeDifferent** parameter to compare each line of content in two text
files.

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

```powershell
Compare-Object -ReferenceObject 'abc' -DifferenceObject 'xyz' -Property Length -IncludeEqual
$objects = @{
ReferenceObject = 'abc'
DifferenceObject = 'xyz'
Property = 'Length'
}
Compare-Object @objects -IncludeEqual
```

```Output
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: What's New in PowerShell 7.4
description: New features and changes released in PowerShell 7.4
ms.date: 06/16/2025
ms.date: 09/11/2025
---

# What's New in PowerShell 7.4

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

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

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

## Updated versions of PSResourceGet and PSReadLine

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

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

## Tab completion improvements
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: What's New in PowerShell 7.5
description: New features and changes released in PowerShell 7.5
ms.date: 06/16/2025
ms.date: 09/11/2025
---

# What's New in PowerShell 7.5

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

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

## Updated modules

PowerShell 7.5.0 includes the following updated modules:
PowerShell 7.5.3 includes the following updated modules:

- **Microsoft.PowerShell.PSResourceGet** v1.1.0
- **Microsoft.PowerShell.PSResourceGet** v1.1.1
- **PSReadLine** v2.3.6

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

## Other cmdlet improvements

- Fix `Out-GridView` by replacing the use of obsolete `BinaryFormatter` with custom implementation
([#25559][25559])
- Enable `-NoRestart` to work with `Register-PSSessionConfiguration` ([#23891][23891])
- Add `IgnoreComments` and `AllowTrailingCommas` options to `Test-Json` cmdlet ([#23817][23817])
(Thanks @ArmaanMcleod!)
Expand Down Expand Up @@ -341,10 +340,10 @@ CollectionSize Test TotalMilliseconds RelativeSpeed
[24115]: https://github.com/PowerShell/PowerShell/pull/24115
[24228]: https://github.com/PowerShell/PowerShell/pull/24228
[24236]: https://github.com/PowerShell/PowerShell/pull/24236
[24749]: https://github.com/PowerShell/PowerShell/issues/24749
[25305]: https://github.com/PowerShell/PowerShell/pull/25305
[25306]: https://github.com/PowerShell/PowerShell/pull/25306
[25324]: https://github.com/PowerShell/PowerShell/pull/25324
[25330]: https://github.com/PowerShell/PowerShell/pull/25330
[25357]: https://github.com/PowerShell/PowerShell/pull/25357
[25547]: https://github.com/PowerShell/PowerShell/pull/25547
[25559]: https://github.com/PowerShell/PowerShell/pull/25559
Loading