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

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...