AD Live changes viewer
GPL-3.0 License
LiveDiffAD is a tiny powershell script used to grab Active Directory changes on the fly.
The script:
LocalUSN
. If the USN is higher, indicating a more recent change, the new value is printed and the internal USN updated accordinglyrepadmin /showchanges
cookies (placed on script start-up in cookie*.bin
files) to print a summary of all the changes made during Show-LiveDiff
call, and avoid missing one of them. Indeed, this method, while using the same concepts, does not reuse the information grabbed by the script. Therefore, one can have a stronger confidence in its global diff results.# Import the script
PS> Import-Module .\livediff.ps1
# Launch the live view
PS> Show-LiveDiff
...
For each change, the script will highlight the target object, and its attributes being changed.
Once the script is terminated, a change summary is printed.
# Summary for the domain naming context
[Summary - DC=WINDOMAIN,DC=LOCAL]
Using cookie from file cookie.bin (132 bytes)
==== SOURCE DSA: DC.WINDOMAIN.LOCAL ====
...
# Summary for the Configuration naming context
[Summary - CN=Configuration,DC=WINDOMAIN,DC=LOCAL]
...
# Summary for the Schema naming context
[Summary - CN=Schema,CN=Configuration,DC=WINDOMAIN,DC=LOCAL]
...
# Summary for the Forest DNS Zones naming context
[Summary - DC=ForestDnsZones,DC=WINDOMAIN,DC=LOCAL]
...
# Summary for the Domain DNS Zones naming context
[Summary - DC=DomainDnsZones,DC=WINDOMAIN,DC=LOCAL]
...
The files cookies*.bin
are updated at the end of the script, and can be used as a checkpoint after the script termination.
The diff_examples directory highlights changes made during some scenarios.