Created
December 12, 2014 15:43
-
-
Save lazywinadmin/175d35311f943f8b4200 to your computer and use it in GitHub Desktop.
Smart way to get the uptime on a local machine
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
function Get-Uptime | |
{ | |
$millisec = [Environment]::TickCount | |
[Timespan]::FromMilliseconds($millisec) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment