Created
April 24, 2015 09:37
-
-
Save lholman/5eaeae3044c7233ef978 to your computer and use it in GitHub Desktop.
compareServerTimes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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