Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Compare Two Objects with PowerShell

$
0
0

Summary: Learn how to use Windows PowerShell to compare two objects to see differences.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see if a particular property from two objects is the same?

Hey, Scripting Guy! Answer Use the Compare-Object cmdlet, specify the reference object, the object to compare, and
           the property you are interested in looking at, for example:

Compare-Object -ReferenceObject $d -DifferenceObject $p -Property lockout


Viewing all articles
Browse latest Browse all 3333

Trending Articles