Check server times for #SharePoint / #ProjectServer farms #PS2010 #SP2010 #MSProject #PowerShell

April 13, 2012 at 4:40 pm | Posted in Administration, Installation, Performance, PowerShell | 2 Comments
Tags: , , , ,

For a server farm it is important that all server times are in sync, for Project Server this is key. For example if the Application server has a different time to the SQL server you might see jobs in the Project Server queue that are in sleeping state. A useful PowerShell script to check all of the server times in the SharePoint farm can be seen below:

The script can be downloaded from the script center here:

#Script needs to be run on a SharePoint server
#Run script with account that has admin access to all servers
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0
$servers = (Get-SPServer) | foreach {$_.Address}

foreach($server in $servers)

$time = Get-WmiObject Win32_LocalTime -computer $server  -EA 0

$hour = $time.Hour
$minute = $time.Minute
$second = $time.Second
Write-Host “$server current time is $hour : $minute : $second”

Write-host “If the server times are not in sync please adjust the time settings. Press any key to continue”
$null = $host.UI.RawUI.ReadKey(“NoEcho,IncludeKeyDown”)

An example output can be seen below:




  1. Hi there, I would like to subscribe for this web site to obtain most up-to-date
    updates, thus where can i do it please help.

    • Hi there,

      On the right hand side of the homepage / any page below the tags and author details you will see a heading “Follow blog via email”.


Sorry, the comment form is closed at this time.

Create a free website or blog at
Entries and comments feeds.

%d bloggers like this: