Hello,
I have object and I want to use property of that object inside condition statement. How do I do that. Example is below. Object is called Diff and I want to use “PropertyName” property as a search condition in “Where” clause for second statement. How do I do that? In this specific case it’s groups but needs to be dynamic.
[DBG]: PS C:\gd\Documents\Projects\WHSSF> $diff | fl * -force PropertyName : groups RefValue : ADSyncAdmins DiffValue : {ADSyncOperators, ADSyncAdmins} [DBG]: PS C:\gd\Documents\Projects\WHSSF> $users | where {$_.groups -eq "ADSyncAdmins"}