Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## iterate over properties for one object to create an array of properties for Select-Object
- $differentProperties = ForEach( $prop in $good.psobject.properties ) { if( $bad.psobject.properties[ $prop.name ] ) { if( $prop.value -ne $bad.psobject.properties[ $prop.name ].value ) { $($prop.name) } } else { $prop.name } }
- $( $good ; $bad ) | select-Object -Property $differentProperties
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement