Summary: Learn how to use Windows PowerShell to compare two objects to see differences.
How can I use Windows PowerShell to see if a particular property from two objects is the same?
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