Link to home
Start Free TrialLog in
Avatar of mjm21
mjm21Flag for United States of America

asked on

Script that would show the time on all Domain Controllers in active directory

Script that would show the time on all Domain Controllers in active directory
Avatar of Anuroopsundd
Anuroopsundd
Flag of India image

http://gallery.technet.microsoft.com/scriptcenter/Determine-a-computers-time-4b3063e2

this is powershell script..

Function Get-NTPSource{
 
Param(
    [Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0)]
    [Alias('Name')]
    [string[]]$Computername=$Env:Computername
    )
 
Process
    {
    foreach ($Computer in $Computername)
        {
        $ntps = w32tm /query /computer:$Computer /source
        new-object psobject -property @{
            Name = $Computer
            NTPSource = $ntps
            }
        }
    }
}
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mjm21

ASKER

Excellent!  Tried the VBscript and worked like a charm.