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

Popular posts from this blog

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B