Description The RepPSAdmin module contains functions to monitor active directory Replication and retrieve Forest and Domain information (including Domain and forest which need user credential). The RepPSAdmin module is based on Framework .NET® Library for accessing the Active directory information. These following operations are possible: 1. Enumerate Forest information: Command: Get-ADForestNET 2. Enumerate Domain information: Command: Get-ADDomainNET 3. Enumerate all replications information: Command: Get-ADGlobalDomainReplication 4. Enumerate replication information of specific partition: Command: Get-ADGlobalReplicationPartitionStatus 5. Enumerate replication information of server: Command: Get-ADServerReplicationStatus 6. Enumerate replication before specific delay Command: Get-LastReplicationGreaterThan 7. Enumerate replication Error with all command. Supported platforms Active directory Mode : Windows 2003 Windows 2008 (Not tested on Active directory Mode 2008 R2, AD LDS, ADAM) It was tested on Windows XP, 2003, 2008, but should work on Windows Vista and Windows 7. Pre requist => Powershell V2 => Active Directory 2000 or later Installation The module can be installed automatically by downloading the EXE package or manually by downloading a ZIP file. The EXE package will install the module under your Documents folder (%USERPROFILE%\Documents\WindowsPowerShell\Modules\RepPsAdmin). The ZIP file contains the module files only and you need to extract its content to one of two places: #%DocumentsUser%\WindowsPowerShell\Modules #%WINDIR%\System32\WindowsPowerShell\v1.0\Modules (need admin privileges) If the directory tree (of one of the above) doesn't exist then you should manually create it. How to use Module to import module , use command import-module -name RepPSAdmin to get all command, use command get-command -module RepPsAdmin to get Help for all commands, use command get-command -module RepPsAdmin | % {get-help $_.name -full} to get Help for commands Get-ADGlobalDomainReplication, use command get-help Get-ADGlobalDomainReplication -full to show all replication status, use command: Get-ADGlobalDomainReplication Help COMMAND NAME Get-ADDomainNET SUMMARY This command permits to get information on a given domain -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-ADDomainNET Description ----------- Gets all information of your (userDNS) Domain . -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-ADDomainNET -DomainName Domain.Lan Description ----------- Gets all informations of Domain Domain.lan. -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-ADDomainNET -DomainName Domain.Lan -username MyUser -Password MyP assword Description ----------- Gets all informations of Domain Domain.lan by using user credential. -------------------------- EXEMPLE 4 -------------------------- C:\PS>$MyCred = Get-Credential Get-ADDomainNET -DomainName Domain.Lan -Credential $MyCred Description ----------- Gets all informations of Domain Domain.lan by using credential. COMMAND NAME Get-ADForestNET SUMMARY This command permits to get information on a given forest -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-ADForestNET Description ----------- Gets all information of your (current) Forest. -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-ADForestNET -ForestName Forest.Lan Description ----------- Gets all informations of Forest Forest.lan. -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-ADForestNET -ForestName Forest.Lan -username MyUser -Password MyP assword Description ----------- Gets all informations of Forest Forest.lan by using user credential. -------------------------- EXEMPLE 4 -------------------------- C:\PS>$MyCred = Get-Credential Get-ADForestNET -ForestName Forest.Lan -Credential $MyCred Description ----------- Gets all informations of Forest Forest.lan by using credential. -------------------------- EXEMPLE 5 -------------------------- C:\PS>Get-ADForestNET | Foreach-Object { $_.domains } Description ----------- Gets all domains information on your Forest. -------------------------- EXEMPLE 6 -------------------------- C:\PS>Get-ADForestNET | Foreach-Object { $.domains | Foreach-Object {$.name} } Description ----------- Gets all domain name on your Forest. COMMAND NAME Get-ADGlobalDomainReplication SUMMARY This command permits to list replication information or status on a given d omain -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-ADGlobalDomainReplication Description ----------- Gets all replication informations of your user DNS Domain (enviromnent var) . -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-ADGlobalDomainReplication -DomainName Domain.Lan Description ----------- Gets all replication informations of Domain Domain.lan. -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-ADGlobalDomainReplication -DomainName Domain.Lan -username MyUser -Password MyPassword Description ----------- Gets all replication informations of Domain Domain.lan by using user creden tial. -------------------------- EXEMPLE 4 -------------------------- C:\PS>$MyCred = get-credential Get-ADGlobalDomainReplication -DomainName Domain.Lan -cred $MyCred Description ----------- Gets all replication informations of Domain Domain.lan by using user creden tial. -------------------------- EXEMPLE 5 -------------------------- C:\PS>Get-ADGlobalDomainReplication -DomainName Domain.Lan | Where {$_.Last SyncResult -ne 0} Description ----------- Get Failed replication informations of domain Domain.lan. -------------------------- EXEMPLE 6 -------------------------- C:\PS>Get-ADGlobalDomainReplication | group partitionname | select name Description ----------- Get Name of partion Name of Domain. COMMAND NAME Get-ADGlobalReplicationPartitionStatus SUMMARY This command permits to Get Partition Status for each domain controler. -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-ADGlobalDomainReplication -PartitionName "dc=Domain,dc=Lan" -Doma inName domain.lan Description ----------- Gets all information of partition named "dc=domain,dc=lan" -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-ADGlobalDomainReplication -PartitionName "dc=DomainDNSZones,dc=Do main,dc=Lan" -DomainName domain.lan Description ----------- Gets all information of partition Domain DNS Zones -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-ADGlobalDomainReplication -PartitionName "dc=DomainDNSZones,dc=Do main,dc=Lan" | Where {$_.LastSyncResult -ne 0} Description ----------- Gets all failed replications of partition Domain DNS Zones COMMAND NAME Get-ADServerReplicationStatus SUMMARY This command permits to Get Replication Status of specific Server . -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-ADServerReplicationStatus -ServerName MyServer -SourceServer Description ----------- Gets all replication informations of source server MyServer -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-ADServerReplicationStatus -ServerName MyServer -Destinationserver Description ----------- Gets all replication informations of destination server MyServer -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-ADServerReplicationStatus -ServerName MyServer -Both Description ----------- Gets all replication informations of destination / source server : MyServe r COMMAND NAME Get-LastReplicationGreaterThan SUMMARY This command permits to get Last replication before time . -------------------------- EXEMPLE 1 -------------------------- C:\PS>Get-LastReplicationGreaterThan -DomainName domain.lan Description ----------- Gets all information of partition on domain.lan -------------------------- EXEMPLE 2 -------------------------- C:\PS>Get-LastReplicationGreaterThan -minutes 15 -DomainName domain.lan Description ----------- Gets all replication information for domain.lan greater than 15 minutes -------------------------- EXEMPLE 3 -------------------------- C:\PS>Get-LastReplicationGreaterThan -hours 2 -DomainName domain.lan Description ----------- Gets all replication information for domain.lan greater than 2 hours -------------------------- EXEMPLE 4 -------------------------- C:\PS>Get-LastReplicationGreaterThan -hours 2 -minutes 30 -DomainName domai n.lan Description ----------- Gets all replication information for domain.lan greater than 2 hours and 30 minutes -------------------------- EXEMPLE 5 -------------------------- C:\PS>Get-LastReplicationGreaterThan -hours 2 -minutes 30 -DomainName domai n.lan -ReplicationError Description ----------- Gets all Replication Errors for domain.lan greater than 2 hours and 30 minu tes -------------------------- EXEMPLE 6 -------------------------- C:\PS>Get-LastReplicationGreaterThan -ReplicationError Description ----------- Gets all Replication Errors for domain.lan Support: Use Discussions TAB to do all requests or modifications. You can email me too: slesire.codeplex#@#live.fr replace #@# per @
|