Add unicode characters

This commit is contained in:
Markus Fleschutz 2021-04-16 18:46:03 +02:00
parent f43dc498e4
commit 46f7fd7b9c
10 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-cpu-temp.ps1
.DESCRIPTION checks the CPU temperature
@ -26,7 +26,7 @@ try {
} elseif ($Temp -lt "0") {
write-warning "$Temp °C CPU temperature is quite low"
} else {
write-host -foregroundColor green "OK - $Temp °C CPU temperature"
write-host -foregroundColor green "✔️ $Temp °C CPU temperature"
}
exit 0
} catch {

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-dns-resolution.ps1
.DESCRIPTION checks the DNS resolution with frequently used domain names
@ -25,7 +25,7 @@ try {
$Elapsed = $StopWatch.Elapsed
$Average = [math]::round($Count / $Elapsed.Seconds, 1)
write-host -foregroundColor green "OK - $Average domains/s ($Count domains resolved in $($Elapsed.Seconds) seconds)"
write-host -foregroundColor green "✔️ $Average domains/s ($Count domains resolved in $($Elapsed.Seconds) seconds)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-drive-space.ps1 [<drive>] [<min-level>]
.DESCRIPTION checks the given drive for free space left
@ -22,7 +22,7 @@ try {
write-warning "Drive $Drive has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
exit 1
}
write-host -foregroundColor green "OK - $Free GB left on drive $Drive ($Used GB of $Total GB used)"
write-host -foregroundColor green "✔️ $Free GB left on drive $Drive ($Used GB of $Total GB used)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-file-system.ps1 [<drive>]
.DESCRIPTION checks the validity of the file system (needs admin rights)
@ -18,7 +18,7 @@ try {
$Result = repair-volume -driveLetter $Drive -scan
if ($Result -ne "NoErrorsFound") { throw "'repair-volume' failed" }
write-host -foregroundColor green "OK - file system on drive $Drive is clean"
write-host -foregroundColor green "✔️ file system on drive $Drive is clean"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-health.ps1
.DESCRIPTION checks the health of the local computer
@ -31,7 +31,7 @@ if ($lastExitCode -ne "0") { $Healthy = 0 }
if ($lastExitCode -ne "0") { $Healthy = 0 }
if ($Healthy) {
write-host -foregroundColor green "OK - $Hostname is healthy"
write-host -foregroundColor green "✔️ $Hostname is healthy"
exit 0
} else {
write-warning "$Hostname is NOT healthy"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-ping.ps1
.DESCRIPTION checks the ping latency to the internet
@ -25,7 +25,7 @@ try {
}
$Avg = $Avg / $Pings.count
write-host -foregroundColor green "OK - $Avg ms average ping latency ($Min ms min, $Max ms max)"
write-host -foregroundColor green "✔️ $Avg ms average ping latency ($Min ms min, $Max ms max)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-swap-space.ps1 [<min-level>]
.DESCRIPTION checks the free swap space
@ -31,7 +31,7 @@ try {
write-warning "Swap space has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
exit 1
}
write-host -foregroundColor green "OK - $Free GB left on swap space ($Used GB of $Total GB used)"
write-host -foregroundColor green "✔️ $Free GB left on swap space ($Used GB of $Total GB used)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/pwsh
<#
.SYNTAX check-windows-system-files.ps1
.DESCRIPTION checks the validity of the Windows system files (requires admin rights)
@ -12,7 +12,7 @@ try {
sfc /verifyOnly
if ($lastExitCode -ne "0") { throw "'sfc /verifyOnly' failed" }
write-host -foregroundColor green "OK - Windows system files have been checked"
write-host -foregroundColor green "✔️ checked Windows system files"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -28,7 +28,7 @@ try {
$Count++
}
write-host -foregroundColor green " fetched updates for $Count Git repositories under $ParentDir in $($StopWatch.Elapsed.Seconds) second(s)"
write-host -foregroundColor green "✔️ fetched updates for $Count Git repositories under $ParentDir in $($StopWatch.Elapsed.Seconds) second(s)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -1,4 +1,4 @@
# My PowerShell Profile
# My PowerShell Profile
# =====================
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
# Comment, uncomment or adapt the following lines to your needs, please.
@ -6,7 +6,7 @@
# My Welcome Message
# ------------------
write-host "+++ Welcome to PowerShell $($PSVersionTable.PSVersion) at $(hostname), it's $(Get-date) +++"
write-host "❤️ Welcome to PowerShell $($PSVersionTable.PSVersion) at $(hostname), it's $(Get-date) ❤️"
write-host ""