Update write-motd.ps1

This commit is contained in:
Markus Fleschutz 2022-05-09 08:37:28 +02:00 committed by GitHub
parent 2131b72577
commit f69e1e428f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ $Kernel_Info = "" # todo
$BootTime = Get-WinEvent -ProviderName eventlog | Where-Object {$_.Id -eq 6005} | Select-Object TimeCreated -First 1
$TimeSpan = New-TimeSpan -Start $BootTime.TimeCreated.Date -End (Get-Date)
$Uptime = $TimeSpan.Days + " days " + $TimeSpan.Hours + " hours " + $TimeSpan.Minutes + " minutes"
$Uptime = "$($TimeSpan.Days) days, $($TimeSpan.Hours) hours, $($TimeSpan.Minutes) minutes"
$PowerShellVersion = $PSVersionTable.PSVersion
$PowerShellEdition = $PSVersionTable.PSEdition