Solved

How to query Windows Server time server synch value using powershell ?

Posted on 2011-09-04
6
499 Views
Last Modified: 2012-06-27
Hi All,

I got mixed environment of Windows Server 2003 and 2008 that is not joined to the domain and some of them also joined to the domain, what I'd like to do is to get the time server value which this particular server currently in synch with using pwoershell.

Is it possible ?
0
Comment
6 Comments
 
LVL 13

Expert Comment

by:Felix Leven
ID: 36482647
Free:
http://poshcode.org/2604

Nice but, not free (get-time) Trial available^^:
http://www.powershellinside.com/powershell/netcmdlets/
0
 
LVL 26

Expert Comment

by:Leon Fester
ID: 36483252
Not sure what your problem is but "The W32Time service is not a full-featured NTP solution that meets time-sensitive application needs and is not supported by Microsoft as such."

Have a look at the following links to get a better understanding
How the Windows Time Service Works
http://technet.microsoft.com/en-us/library/cc773013(WS.10).aspx

Support boundary to configure the Windows Time service for high accuracy environments
http://support.microsoft.com/kb/939322
0
 
LVL 24

Expert Comment

by:Awinish
ID: 36483619
Why specific powershell. below link might help you.
http://technet.microsoft.com/en-us/library/ee332526.aspx

Regards
________________________________________
Awinish Vishwakarma
MY BLOG:  awinish.wordpress.com
0
Swamped with email signature updates?

Have you been given a load of changes to make to your users’ email signatures? Having to manually implement multiple signatures for every department? Let Exclaimer save you from being swamped with email signature updates!

 
LVL 3

Accepted Solution

by:
klalakomacoi earned 500 total points
ID: 36483649
Give this a go:

$servers = @('server01','server02')

foreach ($server in $servers){
$ntps = w32tm /query /computer:$server /configuration | ?{$_ -match 'ntpserver:'} | %{($_ -split ":\s\b")[1]}
new-object psobject -property @{
    Server = $Server
    NTPSource = $ntps
    }
}

Open in new window

0
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 36483674
thanks people for the reply.

@klalakomacoi: how to execute this against DMZ VM which doesn't join the AD domain ?
0
 
LVL 3

Assisted Solution

by:klalakomacoi
klalakomacoi earned 500 total points
ID: 36485327

how to execute this against DMZ VM which doesn't join the AD domain?

yes in this case you would have to run it under a different security context (probably something like DMZSERVER\administrator).  Also given that this machine is on your DMZ you are probably traversing your firewall which is an added wrinkle.

If you are crossing a firewall you should probably read up on this: http://blogs.msdn.com/b/wmi/archive/2009/07/22/new-default-ports-for-ws-management-and-powershell-remoting.aspx
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article will help you understand what HashTables are and how to use them in PowerShell.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now