< Back

Compare-PSFArray

Sun Jan 19, 2020 6:38 pm

NAME Compare-PSFArray



SYNOPSIS

Compares two arrays.





SYNTAX

Compare-PSFArray [-ReferenceObject] <Object[]> [-DifferenceObject] <Object[]> [-OrderSpecific] [-Quiet]

[<CommonParameters>]





DESCRIPTION

Compares two arrays.





PARAMETERS

-ReferenceObject <Object[]>

The first array to compare with the second array.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DifferenceObject <Object[]>

The second array to compare with the first array.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OrderSpecific [<SwitchParameter>]

Makes the comparison order specific.

By default, the command does not care for the order the objects are stored in.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Quiet [<SwitchParameter>]

Rather than returning a delta report object, return a single truth statement:

- $true if the two arrays are equal

- $false if the two arrays are NOT equal.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Compare-PSFArray -ReferenceObject $arraySource -DifferenceObject $arrayDestination -Quiet -OrderSpecific



Compares the two sets of objects, and returns ...

- $true if both sets contains the same objects in the same order

- $false if they do not











RELATED LINKS