We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function uptime { $bootuptime = (Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime $CurrentDate = Get-Date $uptime = $CurrentDate - $bootuptime #Windows Powershell only net statistics workstation | Select-String "since" | foreach-object {$_.ToString().Replace('Statistics since ', 'Last Reboot: ')} Write-Output "Uptime: Days: $($uptime.days), Hours: $($uptime.Hours), Minutes:$($uptime.Minutes), Seconds:$($uptime.Seconds)" Remove-Variable bootuptime Remove-Variable CurrentDate Remove-Variable uptime }
preview of how that looks in powershell, works in both 5 and 7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
preview of how that looks in powershell, works in both 5 and 7
The text was updated successfully, but these errors were encountered: