mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-26 01:43:37 +01:00
Update write-motd.ps1
This commit is contained in:
parent
f1682f3604
commit
2eb776610a
@ -27,7 +27,9 @@ $OSName = "$((Get-WmiObject win32_operatingsystem).caption) Build: $([System.Env
|
||||
$Kernel = "NT" # todo
|
||||
$Kernel_Info = "" # todo
|
||||
|
||||
$Uptime = 'S' + $(net statistics workstation | find "Statistics since").Substring(12).Trim();
|
||||
$BootTime = Get-WinEvent -ProviderName eventlog | Where-Object {$_.Id -eq 6005} | Select-Object TimeCreated -First 1
|
||||
$TimeSpan = (Get-Date) - $BootTime
|
||||
$Uptime = $TimeSpan.Days + " days " + $TimeSpan.Hours + " hours " + $TimeSpan.Minutes + " minutes"
|
||||
$PowerShellVersion = $PSVersionTable.PSVersion
|
||||
$PowerShellEdition = $PSVersionTable.PSEdition
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user