PowerShell/scripts/play-imperial-march.ps1

39 lines
1.1 KiB
PowerShell
Raw Normal View History

2024-10-01 15:24:16 +02:00
<#
2021-08-18 10:01:07 +02:00
.SYNOPSIS
2021-09-24 17:19:49 +02:00
Plays the Imperial March (Star Wars)
2021-10-04 21:29:23 +02:00
.DESCRIPTION
2022-02-10 08:57:52 +01:00
This PowerShell script plays the Imperial March used in the Star Wars film series.
2021-08-18 10:01:07 +02:00
.EXAMPLE
2024-01-25 13:58:06 +01:00
PS> ./play-imperial-march.ps1
(listen and enjoy)
2021-08-18 10:01:07 +02:00
.LINK
https://github.com/fleschutz/PowerShell
2022-06-01 09:36:35 +02:00
.NOTES
Author: Markus Fleschutz | License: CC0
2021-08-18 10:01:07 +02:00
#>
2024-01-25 13:58:06 +01:00
try {
[System.Console]::beep(440, 500)
[System.Console]::beep(440, 500)
[System.Console]::beep(440, 500)
[System.Console]::beep(349, 350)
[System.Console]::beep(523, 150)
[System.Console]::beep(440, 500)
[System.Console]::beep(349, 350)
[System.Console]::beep(523, 150)
[System.Console]::beep(440, 1000)
[System.Console]::beep(659, 500)
[System.Console]::beep(659, 500)
[System.Console]::beep(659, 500)
[System.Console]::beep(698, 350)
[System.Console]::beep(523, 150)
[System.Console]::beep(415, 500)
[System.Console]::beep(349, 350)
[System.Console]::beep(523, 150)
[System.Console]::beep(440, 1000)
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}