mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-26 06:18:17 +01:00
Added list-timezones.ps1
This commit is contained in:
parent
138a0d2b20
commit
92634a3cf9
@ -40,6 +40,7 @@ list-processes.ps1, lists the local computer processes
|
||||
list-random-passwords.ps1, prints a list of random passwords
|
||||
list-random-pins.ps1, prints a list of random PIN's
|
||||
list-scripts.ps1, lists the PowerShell scripts in this repository
|
||||
list-timezones.ps1, lists all timezones available
|
||||
locate-city.ps1, prints the geographic location of the given city
|
||||
locate-ipaddress.ps1, prints the geographic location of the given IP address
|
||||
locate-zip-code.ps1, prints the geographic location of the given zip-code
|
||||
|
|
@ -48,6 +48,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
|
||||
* [list-random-passwords.ps1](Scripts/list-random-passwords.ps1) - prints a list of random passwords
|
||||
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
|
||||
* [list-scripts.ps1](Scripts/list-scripts.ps1) - lists the PowerShell scripts in this repository
|
||||
* [list-timezones.ps1](Scripts/list-timezones.ps1) - lists all timezones available
|
||||
* [locate-city.ps1](Scripts/locate-city.ps1) - prints the geographic location of the given city
|
||||
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - prints the geographic location of the given IP address
|
||||
* [locate-zip-code.ps1](Scripts/locate-zip-code.ps1) - prints the geographic location of the given zip-code
|
||||
|
15
Scripts/list-timezones.ps1
Executable file
15
Scripts/list-timezones.ps1
Executable file
@ -0,0 +1,15 @@
|
||||
#!/snap/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./list-timezones.ps1
|
||||
.DESCRIPTION lists all timezones available
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
get-timezone -listavailable | format-table -property Id,DisplayName,SupportsDaylightSavingTime
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user