Wmic tool to check Active Directory replications

Wmic tool to check Active Directory replications

I have written a bash script based on the wmic tool (available here / procedure here) to check the status of the Active Directory replication between my domain controllers. The script performs these steps :

  • list the domain controllers hostname+ip addresses in the DNS zone _msdcs.domain.local
  • request the wmi to get the replication status
  • store the result in a csv file

To be sure the WMI communication is ok between the linux box and the domain controllers, you will need to configure the WMI properties on all the domain controllers :

  • Computer Management > Configuration > WMI Control > Properties
  • Security tab
  • Click on the security button
  • Click the Add button
  • Add the user account that will execute the WMI requests
  • Add the following rights : Execute method, Enable Account, Remote enable and Read security

With the following php code you can visualize the csv content (jquery is only required to automatically refresh the page):

You can download here the icon package. The page looks like that :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By : XYZScripts.com