1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-04-11 20:48:17 +02:00

Update write-motd.ps1

This commit is contained in:
Markus Fleschutz 2022-05-09 07:58:38 +02:00 committed by GitHub
parent ead2e57075
commit 682329f09d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,16 @@
This PowerShell script writes the message of the day (MOTD). This PowerShell script writes the message of the day (MOTD).
.EXAMPLE .EXAMPLE
PS> ./write-motd PS> ./write-motd
.NOTES
Author: Markus Fleschutz / License: CC0
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz / License: CC0
#> #>
param () param ()
# Retrieve information: # Retrieve information:
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
$TimeZone = (Get-TimeZone).id $TimeZone = (Get-TimeZone).id
$UserName = [Environment]::USERNAME $UserName = [Environment]::USERNAME
$ComputerName = [System.Net.Dns]::GetHostName().ToLower() $ComputerName = [System.Net.Dns]::GetHostName().ToLower()
@ -92,3 +94,4 @@ Write-Host " System Volume: " -NoNewline -ForegroundColor Red
Write-Host "$Disk_Size" -ForegroundColor Cyan Write-Host "$Disk_Size" -ForegroundColor Cyan
Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow
[Environment]::NewLine [Environment]::NewLine
exit 0 # success