Skip to content

Instantly share code, notes, and snippets.

@lholman
Created April 24, 2015 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lholman/5eaeae3044c7233ef978 to your computer and use it in GitHub Desktop.
Save lholman/5eaeae3044c7233ef978 to your computer and use it in GitHub Desktop.
compareServerTimes
#Taken from original article here: http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/05/use-powershell-to-easily-compare-the-time-between-two-computers.aspx
#Compare time on two servers using TimeSpan
new-timespan -Start (icm 192.168.1.1 {get-date}) -end (icm 192.168.1.2 {get-date})
#Compare time on two servers using invoke-command
invoke-command -ComputerName192.168.1.1 -ScriptBlock {get-date} | Format-List * ; invoke-command -ComputerName 192.168.1.2 -ScriptBlock {get-date} | Format-List *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment