Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created December 12, 2014 15:43
Show Gist options
  • Save lazywinadmin/175d35311f943f8b4200 to your computer and use it in GitHub Desktop.
Save lazywinadmin/175d35311f943f8b4200 to your computer and use it in GitHub Desktop.
Smart way to get the uptime on a local machine
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