Files

20 lines
514 B
PowerShell
Raw Permalink Normal View History

2025-08-05 15:05:50 +00:00
<#
Author: Gabe Kerntke
Company: UFS LLC
Date: 12-05-2024
.Synopsis
.Modified
2024-12-05 (GabeK) - Original script created
#>
#Region Start Script
If($args.count -eq 0) { $Computer = "." }
Else { $Computer = $args[0] }
$LastBootTime = (Get-WmiObject Win32_OperatingSystem -ComputerName $Computer ).LastBootUpTime
$UpTime = (New-TimeSpan ([System.Management.ManagementDateTimeconverter]::ToDateTime($LastBootTime)) (Get-Date) | Select-Object -ExpandProperty Days)
$UpTime
#Region End Script