If you are using Entra Sync (which used to be called AD-Connect) and this is the software responsible for keeping your on-premises domain in sync with Entra.
I would rather remotely manager servers that physically (or virtually) logging into them, so let script the start of one of these sync cycles in Powershell.
Script : EntraSyncRemote.ps1
param(
[switch]$Full
)
# Define server name
$ServerName = "<servername>"
try {
# Create remote script block
$scriptBlock = {
Import-Module ADSync
if ($using:Full) {
Start-ADSyncSyncCycle -Policy Initial
Write-Host "Running Initial (Full) sync on $using:ServerName"
} else {
Start-ADSyncSyncCycle -Policy Delta
Write-Host "Running Delta sync on $using:ServerName"
}
}
# Execute remote command
Invoke-Command -ComputerName $ServerName -ScriptBlock $scriptBlock
}
catch {
Write-Error "Failed to execute AD sync: $_"
}