Close Menu
    Facebook X (Twitter) Instagram
    Trending
    • Workplace Ninja User Group Denmark – April 2026 Meetup
    • Workplace Ninja User Group Denmark March 2026 Meetup
    • Workplace Ninja User Group Denmark February 2026 Meetup
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    • Workplace Ninja User Group Denmark February Meetup
    • Workplace Ninja User Group Denmark Meetup – May 2022
    • Workplace Ninja User Group Denmark Meetup – April 2022
    RONNIPEDERSEN.COM
    • Home
    • Enterprise Mobility
      • Configuration Manager
      • Identity and Access
      • Information Protection
      • Intune
    • Cloud and Data Center
      • Data Center Management
      • Group Policy
      • Enterprise Security
      • Hyper-V
      • PowerShell
    • Guides
    • Webcasts
    • Links
    • About
      • Contact me
      • Disclaimer
    RONNIPEDERSEN.COM
    You are at:Home»Cloud and Data Center»Replicate Active Directory

    Replicate Active Directory

    0
    By Ronni Pedersen on July 31, 2011 Cloud and Data Center, Data Center Management, Group Policy, Uncategorized, Windows Server

    From time to time I spend time on troubleshooting Active Directory and SYSVOL replication at my customers. The built in replication schedule are great, but some time it’s nice to force replication on all Domain Controllers to minimize the waiting time…

    This script will force an instant replication on all domain controllers.

    ReplicateAD.vbs

    Option Explicit

    Dim objDSE, strDN, objContainer, objChild, sCommand, WshShell

    Set objDSE = GetObject(“LDAP://rootDSE”)

    strDN = “OU=Domain Controllers,” & objDSE.Get(“defaultNamingContext”)

    Set objContainer = GetObject(“LDAP://” & strDN)

    sCommand = “%COMSPEC% /C ”

    Set WshShell = WScript.CreateObject(“WScript.Shell”)

    objContainer.Filter = Array(“Computer”)

    For Each objChild In objContainer

    WshShell.Run(sCommand & “repadmin /syncall ” & mid(objChild.Name,4) & ” /A /e”)

    Next

    • Tweet
    • Share 0
    • +1
    • LinkedIn 0

    Related

    Ronni Pedersen
    • Website
    • Facebook
    • X (Twitter)
    • LinkedIn

    My name is Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Enterprise Client Management solutions, based on technologies like AzureAD, Intune, EMS and System Center Configuration Manager. I'm is also a Microsoft Certified Trainer and Microsoft MVP in Enterprise Mobility.

    Related Posts

    Successful Adoption of a “Cloud First” Strategy

    Workplace Ninja User Group Denmark Meetup – May 2022

    SCCM: Unable to run Data Warehouse Reports from Remote SQL

    Leave A Reply Cancel Reply

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

    Follow
    APENTO

    Follow APENTO here:

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    About
    My name i s Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Endpoint Management and Security, based on Microsoft technologies. I'm also a Microsoft Certified Trainer and a dual Microsoft MVP in both Security and Windows.
    Recent Posts
    • Workplace Ninja User Group Denmark – April 2026 Meetup
    • Workplace Ninja User Group Denmark March 2026 Meetup
    • Workplace Ninja User Group Denmark February 2026 Meetup
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    Archives
    TOP POSTS
    • Workplace Ninja User Group Denmark – April 2026 Meetup
    • Windows Vista Pre-Build VHD available for download
    • Workplace Ninja User Group Denmark March 2026 Meetup
    • SCCM 2012: Requirement Rules for Microsoft Office 32 or 64 bit
    • Azure AD: Authentication Administrator Role is now available
    RECENT COMMENTS
    • cOSHi on Missing “UserType” attribute in Azure AD
    • Gus on Pro Tip: Use Ctrl+Alt+D from the Azure Portal to get performance information
    • Sebi on Prepare for Co-Management: Migrate Intune Devices without user affinity
    • Vadim P on SCCM: Failed to Get Client Identity (80004005)
    • TM on Active Directory Based Activation in an multi domain environment
    DISCLAIMER
    The content on this website is presented "as-is" with no guarantees. The use of scripts from this website is at your own risk. Always test before putting something in production! Opinions expressed are my own.
    © 2026 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.