compare-object on multidimensional array?
i have array 2 columns, username , enabled. i store array in variable called $current. make modifications , store new array in variable called $updated. username column same in both, enabled field may or may not have changes, values of either true or false.
what want take difference between $current , $updated generate list of changes. can done compare-object or other method can use?
if run compare-object $current $updated returns nothing, there differences in 2 arrays.
does work you?
compare-object ($current | convertto-csv) ($updated | convertto-csv)
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Windows Server > Windows PowerShell
Comments
Post a Comment