mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 21:20:51 +01:00
Update check-time-zone.ps1 and check-health.ps1
This commit is contained in:
parent
e4830a86b6
commit
fd451e1ead
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
& "$PSScriptRoot/check-uptime.ps1"
|
& "$PSScriptRoot/check-uptime.ps1"
|
||||||
& "$PSScriptRoot/check-operating-system.ps1"
|
& "$PSScriptRoot/check-operating-system.ps1"
|
||||||
|
& "$PSScriptRoot/check-time-zone.ps1"
|
||||||
& "$PSScriptRoot/check-swap-space.ps1"
|
& "$PSScriptRoot/check-swap-space.ps1"
|
||||||
& "$PSScriptRoot/check-drives.ps1"
|
& "$PSScriptRoot/check-drives.ps1"
|
||||||
& "$PSScriptRoot/check-cpu.ps1"
|
& "$PSScriptRoot/check-cpu.ps1"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Determines the time zone
|
Checks the time zone setting
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script determines and returns the current time zone.
|
This PowerShell script determines and prints the current time zone.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-time-zone
|
PS> ./check-time-zone
|
||||||
.LINK
|
.LINK
|
||||||
@ -14,7 +14,7 @@
|
|||||||
try {
|
try {
|
||||||
$TimeZone = (Get-Timezone)
|
$TimeZone = (Get-Timezone)
|
||||||
|
|
||||||
& "$PSScriptRoot/give-reply.ps1" "It's $($TimeZone.DisplayName)"
|
"✅ Time zone is $($TimeZone.DisplayName)."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user