Scripting repadmin /showutdvec or Get-ADReplicationUpToDatenessVectorTable RRS feed

  • General discussion

  • Hi all,

    I'm trying to write a script to do some rudimentary AD replication checking. At the moment I'm running a repadmin /replsummary which identifies domain controllers that are failing inbound replication.

    What I'd like to do is use Repadmin /showutdvec to check outbound replication (in a sense) as /replsummary only checks connection objects that the KCC has created, and not for instances where the KCC hasn't created any connection objects. For this I'd like to use /showutdvec then check the date it reports back is listed as today, for those non-GUID entries.

    So the code would look something like:

    Get all domain controllers in the forest (multi-domain forest)

    For each in the list, run:

                    repadmin /showutdvec serverName "dc=domainName,dc=co,dc=uk"

    Check the output and highlight any valid entries e.g. not GUIDS, or those lines without a  \ in the name field as non-GUIDs come back as siteName\serverName, and highlight those which don't report todays date.

    There is the PowerShell equivalent now which I'd be happy to use if we could highlight what I've mentioned above:



    • Changed type Bill_Stewart Thursday, February 11, 2016 10:21 PM
    Saturday, January 9, 2016 2:14 PM

All replies

  • Use Get-AdDomain

    # list all domain controllers
    Get-AdComputer -filter * -SearchBase (get-addomain|select domaincontrollerscontainer).domaincontrollerscontainer | select name


    Saturday, January 9, 2016 5:43 PM
  • We can also use Net:

    [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers| select name


    Saturday, January 9, 2016 5:47 PM
  • Thanks

    I mean I suppose I could just say something like:

    (Get-ADForest).Domains | %{ Get-ADDomainContoller -Filter * -Server $_} | Select-Object Name | ...

    But I was looking for help in then writing something to run the repadmin /showutdvec against each Domain Controller, specifying the particular domain, then finding in the output the specific issues I've tried to mention above, although possibly not clearly enough!

    Saturday, January 9, 2016 5:56 PM
  • Saturday, January 9, 2016 6:13 PM