Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Compare-Object not working as expected

$
0
0

Hello All Smile

I am using PowerShell v5 on Windows 7

if i do the following

$AA = @{

Name = "Fred Smith"

DOB = [datetime]"1/June/1966"

guid = 222222

}

 

$AB = @{

Name = "Fred Smith"

DOB = [datetime]"1/June/1966"

guid = 111111

}

 

Compare-Object $AA $AB  -IncludeEqual

the result is as follows

InputObject       SideIndicator

-----------       -------------

{guid, Name, DOB} ==

 

but they are no == as the GUID is different in both

Can anyone explain this please?

Thanks

AAnotherUser__

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles