Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Compare-Object results are inaccurate

$
0
0

I am in need of assistance as I am seeing weird results for Compare-Object. I have two lists of DistinguishedNames. The reference object is the full list and the difference object is a list of exceptions.

When using compare object, it is showing results => which would indicate the Exceptions has unique listings, but this is not the case.

I can do a $FullList -Contains [Example from =>] and it comes back True.

Both lists are built from AD itself by passing a SamAccountName into a function that adds them and all user objects that are direct and indirect reports through him (pastebin below). So spaces or case differences would not be a factor.

Pastbin of PowerShell Function

Has anyone else seen this?

Compare-Object -ReferenceObject $FullList -DifferenceObject $ExceptionList 

submitted by /u/jagrock84
[link] [comments]

The post Compare-Object results are inaccurate appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images