?
Solved

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

Posted on 2011-09-04
6
Medium Priority
?
525 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
klalakomacoi earned 2000 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 8

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 2000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 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