I have a script that creates a list based on a custom object, as this saves time because some of the attributes are calculated based on existing AD attibutes.
If I save the results to a .csv or .xml, I can later compare but it only shows either new or removed objects.
Is there a way, without using a database and setting up relationships, etc., to identify which attributes change for each user?
Say that on the second run, one user has their 'Smartcard required for interactive logon' removed. A couple more accounts disabled.
Is there a way, using Compare-Object? If I use Compare-Object -ReferenceObject $one -DifferenceObject $two -passthru, it only shows 'one side' of the compare.
What I'm hoping to achive is to get a list that shows the previous and current value for only those attributes changed. i.e.
SamAccountName SCRequired Disabled Groups
User1 True/False
User2 False/True
User3 False/True
User4 OldGroups/NewGroups
Only the Old/New values for attributes that changed. Is this even possible without using an intermidary database?