mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-21 23:43:25 +01:00
104 lines
2.4 KiB
Markdown
104 lines
2.4 KiB
Markdown
Script: *play-mission-impossible.ps1*
|
|
========================
|
|
|
|
This PowerShell script plays the Mission Impossible theme.
|
|
|
|
Parameters
|
|
----------
|
|
```powershell
|
|
PS> ./play-mission-impossible.ps1 [<CommonParameters>]
|
|
|
|
[<CommonParameters>]
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
```
|
|
|
|
Example
|
|
-------
|
|
```powershell
|
|
PS> ./play-mission-impossible.ps1
|
|
(listen and enjoy)
|
|
|
|
```
|
|
|
|
Notes
|
|
-----
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
Related Links
|
|
-------------
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
Script Content
|
|
--------------
|
|
```powershell
|
|
<#
|
|
.SYNOPSIS
|
|
Plays the Mission Impossible theme
|
|
.DESCRIPTION
|
|
This PowerShell script plays the Mission Impossible theme.
|
|
.EXAMPLE
|
|
PS> ./play-mission-impossible.ps1
|
|
(listen and enjoy)
|
|
.LINK
|
|
https://github.com/fleschutz/PowerShell
|
|
.NOTES
|
|
Author: Markus Fleschutz | License: CC0
|
|
#>
|
|
|
|
try {
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(932,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(1047,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[console]::Beep(699,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(740,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(932,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(1047,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(784,150)
|
|
Start-Sleep -m 300
|
|
[System.Console]::Beep(699,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(740,150)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(932,150)
|
|
[System.Console]::Beep(784,150)
|
|
[System.Console]::Beep(587,1200)
|
|
Start-Sleep -m 75
|
|
[System.Console]::Beep(932,150)
|
|
[System.Console]::Beep(784,150)
|
|
[System.Console]::Beep(554,1200)
|
|
Start-Sleep -m 75
|
|
[System.Console]::Beep(932,150)
|
|
[System.Console]::Beep(784,150)
|
|
[System.Console]::Beep(523,1200)
|
|
Start-Sleep -m 150
|
|
[System.Console]::Beep(466,150)
|
|
[System.Console]::Beep(523,150)
|
|
exit 0 # success
|
|
} catch {
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
exit 1
|
|
}
|
|
```
|
|
|
|
*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 05/19/2024 10:25:25)*
|