使用Active Directory,监控复制的好方法是什么?
我有多个站点和多个位置,因此理想情况下,将监视站点之间和站点内的复制.我不确定是否需要监控每个DC,每个NTDS连接或每个DC *每个NTDS连接.
为了适应标准的警报方法,perfmon计数器允许我警告复制是否落后X分钟似乎是理想的.
通过目录服务Perfmon计数器,我看不到任何似乎正是我想要的东西.
我碰巧使用支持powershell(Orion)的监控系统,所以我写得非常快,我将看看它如何满足我的需求:
#PS Script to Monitor Seconds since Last Successful AD Sync (By taking the longest (max) of any partition #KMB 11/22/2011 #http://archive.msdn.microsoft.com/RepPSAdmin/Release/ProjectReleases.aspx?ReleaseId=5267 import-module -name RepPSAdmin $hostname = $env:COMPUTERNAME #PS C:\Windows\system32> Get-ADServerReplicationStatus -ServerName $hostname -SourceServer | Get-Member -memberType *property $now = Get-Date $latest = New-Timespan -start $now -end $now Get-ADServerReplicationStatus -ServerName $hostname -SourceServer | foreach-object { #Write-Host $_.LastSuccessfulSync} $temp = $now - $_.LastSuccessfulSync #Write-Host $_.LastSuccessfulSync :: $temp :: $temp.TotalSeconds if ($temp.TotalSeconds -gt $latest.TotalSeconds) { $latest = $temp } } Write-Host $latest.TotalSeconds
免责声明 – 这个脚本仍然是一个工作和进步,我真的不知道powershell 原文链接:https://www.f2er.com/windows/368231.html