Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 4.0 » Compare-Object

Compare-Object - Powershell 4.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Compare-Object

Short description
Compares two sets of objects.

Syntax


Description
The Compare-Object cmdlet compares two sets of objects. One set of objects is the "reference set," and the other set 
is the "difference set."


The result of the comparison indicates whether a property value appeared only in the object from the reference set 
(indicated by the <= symbol), only in the object from the difference set (indicated by the => symbol) or, if the 
IncludeEqual parameter is specified, in both objects (indicated by the == symbol).


NOTE:  If the reference set or the difference set is null ($null), Compare-Object generates a terminating error.