Posted On March 30, 2019

Simple Active Directory & DNS Synchronization Script

kimconnect 0 comments
blog.KimConnect.com >> Codes , Networking >> Simple Active Directory & DNS Synchronization Script
@echo off

GOTO push_or_pull

:push_or_pull
set /p action="Type in Push, Pull, or Quit. Press Enter for default action = push: " || set action=push

IF /i %action% == pull GOTO pull
IF /i %action% == push GOTO push
IF /I %action% == quit GOTO end
IF /I %action% == q GOTO end
IF /i NOT %action% == pull GOTO try_again

:try_again
echo "Input not recognized. Please try again."
GOTO push_or_pull

:pull
REM Pulls a replication from a specific Domain Controller
set /p dc="Enter DC to pull replication from: "
repadmin /syncall %dc% /d /e /a /A
GOTO end

:push
REM Pushes a replication to a specific DC
set /p dc="Enter DC to push replication to: "
repadmin /syncall %dc% /d /e /a /A /P
GOTO end

:end
pause

Leave a Reply

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

Related Post

PowerShell: Impersonation to Download Files Through Proxy

Initial Script to without impersonation # Change these values to reflect your desired downloads[string]$fileSource =…

PowerShell: Creating VSS Snapshots on Microsoft File Server Clusters

<# VSS-Snapshots-on-Microsoft-File-Server-Clusters_v0.0.1.ps1 # Author: KimConnect.com Functions: 1. Create snapshots of all volumes on a file…

PowerShell: Check Registry Path, Key, and Dword Value

$path='HKLM:\Software\Intel' $keyName='GMM' $dwordName='DedicatedSegmentSize' $dwordValue=512 Function CheckRegistryKey { param( [Parameter(Position = 0, Mandatory = $true)][String]$path, [Parameter(Position…