Vérifier les réplications Active Directory

Envoyer

Sommaire

Active Directory Replication Status Tool

Depuis quelques semaines, Microsoft nous propose un nouvel outil pour la surveillance des réplications Active Directory. Un digne remplaçant au fameux outil REPLMON (replication monitor), un peu plus « user friendly » que la commande « repadmin /showrepl * /csv ». L’outil est Active Directory Replication Status Tool.

Pour pouvoir l’utiliser, il suffit simplement de disposer du Framework .Net 4 et d’un poste intégré à un domaine Active Directory (seul Windows 2000 n’est pas supporté).

Lorsque vous lancez l’outil, vous avez la possibilité de surveiller les réplications au niveau de la forêt (Forest), d’un domaine spécifique (Domain), par le biais d’une découverte automatique (Select Targets) ou par un import (Load Exported Data Set). Il suffit de cliquer sur « Refresh Replication status » pour lancer l’analyse.

 

 

 

 

 

 

 

 

 

Grâce à  Active Directory Replication Status Tool , vous avez la possibilité de vérifier rapidement que toutes les réplications sont opérationnelles  grâce à un code couleur clair et un filtrage rapide des résultats.

 

 

 

 

 

 

 

Vous avez également la possibilité de pouvoir consulter rapidement la documentation Technet relative à la moindre erreur remontée par l’outil depuis l’onglet « Replication Status Viewer ».

 

 

 

 

 

 

 

 

Autre point extrêmement intéressant est la possibilité de réaliser un export des données collectées dans le cadre d’une analyse hors-ligne ultérieure et de la réimporter à l’aide de l’option « Load Exported Data Set ».

 

 

 

 

 

 

 


Automatiser la notification avec Repadmin

La commande « Repadmin /showrepl * /csv » perd un peu de sa substance avec ce nouvel outil. Nous pouvons toutefois continuer à nous appuyer dessus pour utiliser un script d’automatisation d’envoi de rapports. Cela vous permet de pouvoir surveiller de manière automatique et régulière les réplications Active Directory.

Le script que nous vous proposons permet de formater l’export réalisé à l’aide de la commande « repadmin /showrepl * /csv » au format HTML, avec un classement des résultats par statut (« Error », « Warning » ou « Success ») et d’envoyer le tout par message électronique.

#========================================================================
# Created on:   24/08/2012
# Created by:   AUGAGNEUR Alexandre 
# Filename:     Repadmin-ShowRepl-HTMLReports.ps1
#
# Description:    Generate HTML reports based on 
#                "repadmin /showrepl * /csv" command return,
#                format it and send it by email
#========================================================================


###################################################
#        VARIABLES
###################################################

# Path of CSV/HTML exports
$ExportPath = "c:\temp"

# Path of Repadmin binary (only necessary if not found in $env:path)
$RepadminExec = $null

# Random name of CSV/HTML Export
$BaseFilename = "Repadmin-"+(Get-Date -Format yyMMdd)+"-"+(Get-Random)
$CSVFilename = $BaseFilename+".csv"
$HTMLFilename = $BaseFilename+".html"

# CSV Headers
$Header = "showrepl_COLUMNS","Destination DSA Site","Destination DSA","Naming Context","Source DSA Site","Source DSA", `
 "Transport Type","Number of Failures","Last Failure Time","Last Success Time","Last Failure Status"

# HTML Style
$style = @"
 <style>
 BODY{font-family:"Segoe UI"}
 P{text-decoration:underline;text-indent:40px;font-size:20px;color:DarkSlateGray;font-weight:bold}
 TABLE{border-width: 2px;border-style: solid;border-color: Black;border-collapse: collapse;}
 TABLE.error{border-color:red}
 TABLE.warning{border-color:darkorange}
 TABLE.success{border-color:green}
 TH{border-width: 2px;padding: 0px;border-style: solid;padding:5px}
 TD{border-width: 1px;padding: 0px;border-style: solid;text-align:center}
 TH.error{border-color:red;background-color:salmon}
 TH.warning{border-color:darkorange;background-color:orange}
 TH.success{border-color:green;background-color:limegreen}
 TD.error{border-color: red}
 TD.warning{border-color:darkorange}
 TD.success{border-color:green}
 </style>
"@

# Email notification parameters
$Sender = "sender.at.corpnet.net"
$Recipient = "recipient.at.corpnet.net" # You can specify an array if needed 
$Server = "smtp.corpnet.net"


###################################################
#        FUNCTIONS
###################################################

function EmailNotification($Sender, $Recipient, $Server, $Subject, $Body)
{
 $SMTPclient = new-object System.Net.Mail.SmtpClient $Server

 # SMTP Port (if needed)
 # $SMTPClient.port = 587

 # Enabling SSL (if needed)
 # $SMTPclient.EnableSsl = $true

 # Specify authentication parameters (if needed)
 # $SMTPAuthUsername = "login"
 # $SMTPAuthPassword = "password"
 # $SMTPClient.Credentials = New-Object System.Net.NetworkCredential($SMTPAuthUsername, $SMTPAuthPassword)

 $Message = new-object System.Net.Mail.MailMessage
 $Message.From = $Sender
 $Recipient | %{ $Message.To.Add($_) }
 $Message.Subject = $Subject
 $Message.Body = $Body
 $Message.IsBodyHtml = $true
 
 $SMTPclient.Send($Message)
}


###################################################
#        MAIN
###################################################

# Construct CSV file full path
$CSVExport = Join-Path $ExportPath $CSVFilename

# Find repadmin binary if not defined
if ( !($RepadminExec) )
{
 foreach ( $path in ($env:path).split(";") ) 
 { 
 if (Test-Path $path\repadmin.exe)
 {
 $RepadminExec = "$path\repadmin.exe"
 }
 }
}

if ( $RepadminExec )
{
 # Command to generate replications status
 $StrCmd = "$RepadminExec /showrepl * /csv"
 
 # Generate CSV output
 Invoke-Expression $StrCmd | Out-File $CSVExport
 
 if ( Test-Path $CSVExport )
 {
 $ReplicationsState = Import-Csv -Path $CSVExport -Header $Header -Delimiter ","

 $ServersInError = @()
 $ErrorContent = @()

 # Filtering error messages
 $ReplicationsState | Where-Object { $_."showrepl_COLUMNS" -match "showrepl_ERROR" } | %{
 if ($_.showrepl_COLUMNS -match "showrepl_ERROR") {
 $ServersInError += $_."Destination DSA"
 $ErrorContent += $_
 } 
 }

 # Format errors content
 if ( $ErrorContent )
 {
 $MailObject="AD REPLICATIONS STATUS - $(Get-Date -Format yy/MM/dd) - error(s) found"

 $MailBody += $ErrorContent | Select-Object -Property "Destination DSA",@{ Name="Error Message"; Expression={ $_."Naming Context" } } | ConvertTo-Html -As table -Fragment -PreContent "<p>AD Replications status with errors</p>" -PostContent "<br><br>" | Out-String
 $MailBody = $MailBody.Replace("<th>","<therror"">")
 $MailBody = $MailBody.Replace("<td>","<tderror"">")
 $MailBody = $MailBody.Replace("<table>","<tableerror"">")
 }
 
 # Filtering warning messages
 $WarningContent = $ReplicationsState | Where-Object {  @("showrepl_ERROR","showrepl_COLUMNS") -notcontains $_."showrepl_COLUMNS" -and $_."Last Failure Status" -ne 0 }  
 
 # Format warning content
 if ( $WarningContent )
 {
 if (!$MailObject)
 {
 $MailObject="AD REPLICATIONS STATUS - $(Get-Date -Format yy/MM/dd) - warning(s) found"
 }
 
 $MailBody += $WarningContent | Select-Object -ExcludeProperty "showrepl_COLUMNS","Transport Type" -Property * | ConvertTo-Html -As table -Fragment -PreContent "<p>AD Replications status with warning</p>" -PostContent "<br><br>" | Out-String
 $MailBody = $MailBody.Replace("<th>","<thwarning"">")
 $MailBody = $MailBody.Replace("<td>","<tdwarning"">")
 $MailBody = $MailBody.Replace("<table>","<tablewarning"">")
 }

 # Filtering success messages (uncomment the line if you want to see them in the email report)
 # $SuccessContent = $ReplicationsState | Where-Object { @("showrepl_ERROR","showrepl_COLUMNS") -notcontains $_."showrepl_COLUMNS" -and $_."Last Failure Status" -eq 0} 

 # Format success content
 if ( $SuccessContent )
 {
 if (!$MailObject)
 {
 $MailObject="AD REPLICATIONS STATUS - $(Get-Date -Format yy/MM/dd) - OK"
 }
 
 $MailBody += $SuccessContent | select-object -ExcludeProperty "showrepl_COLUMNS","Transport Type" -Property * | ConvertTo-Html -As table -body "<p>AD Replications status with success</p>" -PreContent $style | Out-String
 $MailBody = $MailBody.Replace("<th>","<thsuccess"">")
 $MailBody = $MailBody.Replace("<td>","<tdsuccess"">")
 $MailBody = $MailBody.Replace("<table>","<tablesuccess"">")
 }

 # Generate HTML file (if wanted)
 # $HTMLExport = Join-Path $ExportPath $HTMLFilename
 # ConvertTo-Html -Head $style -body $MailBody -Title $MailObject | Out-File $HTMLExport
 
 if ( $MailBody )
 {
 EmailNotification $Sender $Recipient $Server $MailObject (ConvertTo-Html -Head $style -Body $MailBody -Title $MailObject | Out-String)
 }
 }
 }

L’avantage avec ce type de solution est que vous pouvez être rapidement informé d’un problème de réplication de manière automatique. Ci-dessous, vous avez des exemples de rapports envoyés par message électronique.

Mise à jour le Dimanche, 02 Septembre 2012 17:26  

Commentaires 

 
0 #1 31-01-2013 10:35
Bonjour,
Merci pour la fonction de message à plusieurs destinataires. C'est génial !
 
 
0 #2 Omer 18-02-2015 11:02
This piece of writing is really a good one it assists new web users, who are wishing for blogging.


Here is my site: Drum Lessons Online: http://www.chopinthecourse.com/
 
 
0 #3 Arlen 21-02-2015 02:20
The sіgnificancе of applying thіs paste is to purify the couρles mind ody and sߋul
for a Һeɑlthy aand happy begіnning of theiг marrieԁ life.

In thіs, tɦe Ҟayastha ɡiгls famjily ѕendѕ ɑ silver bowգl full
of rіce, supaгi aand turrmеric powdеr and an envelop containng caѕh,
symЬolizing the confirmatіon of tthe relatіon to be formed Ƅetween two familіes.
A marriage is not a plkaϲe foг physical satisfaction or prоcreation alone,
bսt it iss the very fiber of life. Howeνer tɦeге is 6/8 orr 2/12 axiѕ placement of Mars and Venus in the mutual
ɦoroscopеs they will dislike or hаtte еacҺ other.
In the Telugu cߋmmunity, the greοօm tіes the Mangalsսtra aгound thе neck of the ƅride wіth threwe knots.Thеrе
are two sucɦ mangalsutras - onnе from thе bride'ѕ family, and one from the groom's family.
Invοlve God in your marrіage and iin ouг lіfе.


Ϝoг eхample, you may have а meddlesomе relative who
consistently pries for information about your ρеrsonal life, or
a friend աho Ƅelieves that ƴour hime should bе accessible to him or her
at ɑny Һοur of the day օr night. I think it is the bеst reаson to қеep your marriɑe ѕοliɗ.
Plan ahead so that eѵery night will be mapρed out witfh things to
study, talk аbout, and prayеrs to rеаɗ (alternate by havinng one of you pick a favorite pаѕsage for each
evening). Sօ bе there for one another. It's
high time thаt уou thіnk aƄout lovig yourself mοre.

By adopting these useful tips, ƴou can make your marriage
a healtɦу and successfսl affaiг for the rest
of your lives.

Remembeer it's not a police intегrߋgatiοn; it'ѕ onlу an inspection which
eνerүone has to go thгоugh so you are not the exception. Sharing how ʏou feel especіally to уοur most trusted
friends could makme things easieг to deal witҺ.
Thіs cɑn be something as sіmpe as going out to dinner or taҟing a nice walk around
the neighborhoοd. Once you get married and things start to settle doաn,
keep an open mind about solvіng any isѕues that come up.

Ԝhat haѕ changed oνer the yeɑrs though, is the
age difference between husband and wife.

Տtatisics place the divοrce rate for arгanged maгriаgеs
muϲh lower than those in the United States, where marriages out of love are the rule.
Latifah's comments woսld sugցewt allegiance աith a similar theme in tɦe self-love community- real love
begins wwith self-lоѵе. Problems can come in the marrіed lіfe of the Scorpiο and the Aries, when the factoors of еmotions come
іnto bеing. When life gets more cߋmplicateԁ аnd places more Ԁemands on yοuг time,
sexual гelatіons are oftsn one oof the fiгst things to
suffer. ВyHаrolɗ Hisona : A how tօ tսtoгial abiut have
a happy marriagе, ɦow to haѵe a happy marriaǥe,
tips on ɦave a happy marriage, Rellationships with step by step guide from
Harold Hisоna. The Indian society still dоеѕ not Һaѵe such aԁvаnced
valuеs that they will start preferrіng love after marriɑge insteɑd
οf love before marriaցe.

For a carԀ, not only delivers thе dеtails
regarding mаrriage but alo symbolizes waгm rеgarԀ annd respect.
According tօ them, legalizing gay marгiage will send out а pօsitive signal
tߋ thе skciety that marгiages ѕhoyld be basedd only on lovе andɗ nothing elsе.
That just goes too shоw that while the stresѕ of today's fɑst
pacеd, ambition-fսeled life iѕ a deal breaker for matrimoniɑl Һarmߋny, some still manage tο sսrvive the raρids of relationshipѕ and pass the test
of long term commitmsnt witɦ flyin colors. We providе all ѡedding-related information that useгs may
want too access when theу need to cеlеbrate a wedding.
You may also want to quіz еach other on your гespective personal
information.

It is perfofmed іn almost all the marriages, ѡіth slіght
modіfications. The neat and clеan marriage likne indicates
a healthy maгried lіfe. They are saikd too be tthе
moѕt intensе and ƿowerful characters
in the еntirе ƶodiac series, and ɑrre also very sеnsitive and emotiߋnal.

Getting tгough the tough imes in your marrіage iis not easy but is
very mmuch possible. But theyу are able to oveгсome them.
It involves only the bridegroom аs he has
to wear a sіlѵer thгеad οn hiis body.

Thus it is fine to say that you don't remember instead of guessing
the answer аnd going down the ѡrong гoad. Ԝhen someeone entered a
marriage they սsed too almosdt fall ijto these roles. The bride is seаted on a wooden plank placed on a
banana leafs filled wirh սncooked rice gгains. Scοrpіos finds іtt very dіfficult to come ooսt of tҺe blames and thrashеs giѵеn by his life partner, which if
caаrried for long, can creɑte mаʝor problems in the mɑrried life of the two.
Eɑch onne of these ϲommunitieѕ has a distinct wеdding stylе fοllοԝing distinct rituals and specific customs.


Tɦе decoratіon of the marriage Mandav is
done after the prayers. This cсoncludes the աedding
cеremony. Hе iis known as maharaj ji between his devotees.
Her loneliness and frustration may goad her into an affair.

I would ƅet ƴou my nwxt paycheck that someone yοu know well
is eitfher divorced or in the midԁle օf one.


Tгaditіonally, marгiages are belіeνеd tο bе solemnizеd for thе continuity of the
human race. Even in cities, some families with ߋrthodoҳ mindset prefer arгanged marriages
over love marriɑges. Tгʏ to chalk out a
daily routine togetheг, wɦerein the two of үou can get to spennd quality time speakіng
to each other օver the ƿhone, or through cҺat ɑnd video
conferencing. Spouses sеt themselves ɑpart from all others, аnd give themselves exсlusivеly to eacɦ
other. Post- Wedԁing ritualѕ After tҺe marriage,
the newly wed Kayastha couple is welcomed by the grߋoms family in his houѕe, folloѡed by a muh-
dikhai ceremony in the ƄriԀe iѕ greetеɗ Ьy gifts
and sweets by all Һer new familү membeгs. Tɦiѕ certificate is
conclusіve certificate of solemnization.

Tɦis may spill ovеr into tɦe bed roоm. Given below arе sme helpful tips that may prove helpful
for a pursuing successfսl marгiеd life. Оne of the gaƴ mareriage fаcts іѕ that it
haas ƅееn legalizeԁ in ѕome parts of Unitеd Stɑtes such аs Massachusetts, Conneϲticut, ӏowa,
Neԝ Hamρshirе, Washington, D.C, and Vermont.
The mɑin part օf the marriage iis Kаnya Dhanam.It haѕ thе girl's maternal uncle carгying the bride inn a bamboo basket to thee mаndap (wedding place).
We all have oսr ownn sidе to a storʏ, and you'd Ƅe suгprised hօw muсh thee other person isѕ dealing
ԝith on the оther side home.

Bеtter put, it points tkwards the need
to settle dօԝn pгofessionally than perѕonally, thus rеsulting in a fall in the marriaɡe
rate and a riѕze in the marгiage age. People spend their
wholе liѵes looking for a perfect match. Tip 4 Keep іn mind
of yߋur kids There is no doubt that your children are yoսr biɡgest treasսre.
Some of them have issues with gгowing age, infatսɑtion aand various otɦeгs.
Ϲhoosing a Housze for Marriage in Fаble 3 Tips 3: I don't кnow what else then. And Gօd blesѕed them.


Maybe once in your life yyou thought you hage fοսnd tҺe right peгsߋn tto grow old with.
Herе arе а couple οf suggestions, one is to include God in oour marriage andd the other іs to change oսr wɑy of thinking concerning mmarriage and suffering.

Say TҺank You Evven fог the little things.

Hеre is my sіte; All events: http://felcvictoria.org/events/10-09-19/Early_Worship.aspx?Returnurl=http://94.75.243.141/wiki/index.php/User:LatonyaMyles
 
 
0 #4 Adrianne 09-03-2015 11:36
I just could not go away your web site before suggesting that I really enjoyed the standard info
an individual provide on your visitors? Is going to be back regularly to investigate cross-check new posts

Check out my homepage; nba 2k15: http://video-ouf.blogspot.fr/search/label/Sports
 

Ajouter un Commentaire

Code de sécurité
Rafraîchir