Update write-motd.ps1

This commit is contained in:
Markus Fleschutz 2022-05-09 08:52:51 +02:00 committed by GitHub
parent ed68ba05d0
commit a1f5934d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ $CurrentLoad = "{0}%" -f $(Get-WmiObject Win32_Processor | Measure-Object -Prope
# $Processor = Get-CimInstance -ClassName Win32_Processor
# $Memory_Size = "{0}mb/{1}mb Used" -f (([math]::round($ReturnedValues.Operating_System.TotalVisibleMemorySize / 1KB)) - ([math]::round($ReturnedValues.Operating_System.FreePhysicalMemory / 1KB))), ([math]::round($ReturnedValues.Operating_System.TotalVisibleMemorySize / 1KB))
$DriveDetails = Get-PSDrive C
$DiskSize = "{0} of {1}GB used" -f (([math]::round($DriveDetails.Used / 1GB), ([math]::round(($DriveDetails.Used + $DriveDetails.Free) / 1GB))))
$DiskSize = "{0}GB of {1}GB used" -f (([math]::round($DriveDetails.Used / 1GB), ([math]::round(($DriveDetails.Used + $DriveDetails.Free) / 1GB))))
# Print results:
[Environment]::NewLine