Created
July 21, 2016 18:20
-
-
Save gerane/6a82e446a18dfd5d30413ff5f9755a99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($Alert -ne $null) | |
| { | |
| $Env:WeatherAlert = $Alert | |
| switch ($Alert.type) | |
| { | |
| 'HUR' { $AlertType = 'Hurricane Local Statement' } | |
| 'TOR' { $AlertType = 'Tornado Warning' } | |
| 'TOW' { $AlertType = 'Tornado Watch' } | |
| 'WRN' { $AlertType = 'Severe Thunderstorm Warning' } | |
| 'SEW' { $AlertType = 'Severe Thunderstorm Watch' } | |
| 'WIN' { $AlertType = 'Winter Weather Advisory' } | |
| 'FLO' { $AlertType = 'Flood Warning' } | |
| 'WAT' { $AlertType = 'Flood Watch / Statement' } | |
| 'WND' { $AlertType = 'High Wind Advisory' } | |
| 'SVR' { $AlertType = 'Severe Weather Statement' } | |
| 'HEA' { $AlertType = 'Heat Advisory' } | |
| 'FOG' { $AlertType = 'Dense Fog Advisory' } | |
| 'SPE' { $AlertType = 'Special Weather Statement' } | |
| 'FIR' { $AlertType = 'Fire Weather Advisory' } | |
| 'VOL' { $AlertType = 'Volcanic Activity Statement' } | |
| 'HWW' { $AlertType = 'Hurricane Wind Warning' } | |
| 'REC' { $AlertType = 'Record Set' } | |
| 'REP' { $AlertType = 'Public Reports' } | |
| 'PUB' { $AlertType = 'Public Information Statement' } | |
| } | |
| Write-Host "[ALERT] $($AlertType): For more information see `$Env:WeatherAlert" -ForegroundColor Red | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment