systeminfo | findstr /C:"System Boot Time" $BootTime = (systeminfo | find "System Boot Time:").Replace("System Boot Time:","").Trim() $BootTime $Uptime = (Get-Date) - [datetime]$BootTime $Uptime
systeminfo | findstr /C:"System Boot Time" $BootTime = (systeminfo | find "System Boot Time:").Replace("System Boot Time:","").Trim() $BootTime $Uptime = (Get-Date) - [datetime]$BootTime $Uptime