mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Added more play* scripts
This commit is contained in:
parent
ba6dedd798
commit
0c51ca75e3
@ -67,6 +67,9 @@ open-browser.ps1, starts the default Web browser
|
||||
open-calculator.ps1, starts the calculator program
|
||||
open-email-client.ps1, starts the default email client
|
||||
play-beep.ps1, plays a beep sound
|
||||
play-mission-impossible.ps1, plays the Mission Impossible theme
|
||||
play-super-mario.ps1, plays the Super Mario Intro
|
||||
play-the-imperial-march.ps1, plays the Imperial March (Star Wars)
|
||||
poweroff.ps1, halts the local computer (requires admin rights)
|
||||
query-smart-data.ps1, queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory
|
||||
new-email.ps1, starts the default email client to write a new email
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
Collection of PowerShell Scripts
|
||||
================================
|
||||
|
||||
**This repository contains 120+ useful and cross-platform PowerShell scripts in the [Scripts/ folder](Scripts/) - to be used by command-line interface (CLI), for remote control (RC), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [FAQ page](Misc/FAQ.md) if you need help or have any questions.**
|
||||
**This repository contains 130+ useful and cross-platform PowerShell scripts in the [Scripts/ folder](Scripts/) - to be used by command-line interface (CLI), for remote control (RC), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [FAQ page](Misc/FAQ.md) if you need help or have any questions.**
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
@ -72,6 +72,9 @@ Table of Contents
|
||||
* [open-calculator.ps1](Scripts/open-calculator.ps1) - starts the calculator program
|
||||
* [open-email-client.ps1](Scripts/open-browser.ps1) - starts the default email client
|
||||
* [play-beep.ps1](Scripts/play-beep.ps1) - plays a beep sound
|
||||
* [play-mission-impossible.ps1](Scripts/play-impossible.ps1) - plays the Mission Impossible theme
|
||||
* [play-super-mario.ps1](Scripts/play-super-mario.ps1) - plays the Super Mario Intro
|
||||
* [play-the-imperial-march.ps1](Scripts/play-the-imperial-march.ps1) - plays the Imperial March (Star Wars)
|
||||
* [poweroff.ps1](Scripts/poweroff.ps1) - halts the local computer (requires admin rights)
|
||||
* [query-smart-data.ps1](Scripts/query-smart-data.ps1) - queries the S.M.A.R.T. data of your HDD/SSD's
|
||||
* [new-email.ps1](Scripts/new-email.ps1) - starts the default email client to write a new email
|
||||
|
@ -12,9 +12,9 @@ try {
|
||||
if ($DirTree -eq "" ) {
|
||||
$DirTree = read-host "Enter the path to the directory tree"
|
||||
}
|
||||
write-progress "Listing empty files in $DirTree ..."
|
||||
[int]$Count = 0
|
||||
Get-ChildItem $DirTree -recurse | Where {$_.PSIsContainer -eq $false} | Where {$_.Length -eq 0} | ForEach-Object {
|
||||
write-progress "Listing empty files in $DirTree ..."
|
||||
get-childItem $DirTree -recurse | where {$_.PSIsContainer -eq $false} | where {$_.Length -eq 0} | foreach-object {
|
||||
write-output $_.FullName
|
||||
$Count++
|
||||
}
|
||||
|
@ -6,10 +6,5 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
[console]::beep(500,300)
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
[console]::beep(500,300)
|
||||
exit 0
|
||||
|
55
Scripts/play-mission-impossible.ps1
Executable file
55
Scripts/play-mission-impossible.ps1
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./play-mission-impossible.ps1
|
||||
.DESCRIPTION plays the Mission Impossible theme
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(932,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(1047,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(699,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(740,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(932,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(1047,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(784,150)
|
||||
Start-Sleep -m 300
|
||||
[console]::beep(699,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(740,150)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(932,150)
|
||||
[console]::beep(784,150)
|
||||
[console]::beep(587,1200)
|
||||
Start-Sleep -m 75
|
||||
[console]::beep(932,150)
|
||||
[console]::beep(784,150)
|
||||
[console]::beep(554,1200)
|
||||
Start-Sleep -m 75
|
||||
[console]::beep(932,150)
|
||||
[console]::beep(784,150)
|
||||
[console]::beep(523,1200)
|
||||
Start-Sleep -m 150
|
||||
[console]::beep(466,150)
|
||||
[console]::beep(523,150)
|
||||
exit 0
|
33
Scripts/play-super-mario.ps1
Executable file
33
Scripts/play-super-mario.ps1
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./play-super-mario.ps1
|
||||
.DESCRIPTION plays the Super Mario Intro
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
[console]::beep(659,250) ##E
|
||||
[console]::beep(659,250) ##E
|
||||
[console]::beep(659,300) ##E
|
||||
[console]::beep(523,250) ##C
|
||||
[console]::beep(659,250) ##E
|
||||
[console]::beep(784,300) ##G
|
||||
[console]::beep(392,300) ##g
|
||||
[console]::beep(523,275) ## C
|
||||
[console]::beep(392,275) ##g
|
||||
[console]::beep(330,275) ##e
|
||||
[console]::beep(440,250) ##a
|
||||
[console]::beep(494,250) ##b
|
||||
[console]::beep(466,275) ##a#
|
||||
[console]::beep(440,275) ##a
|
||||
[console]::beep(392,275) ##g
|
||||
[console]::beep(659,250) ##E
|
||||
[console]::beep(784,250) ## G
|
||||
[console]::beep(880,275) ## A
|
||||
[console]::beep(698,275) ## F
|
||||
[console]::beep(784,225) ## G
|
||||
[console]::beep(659,250) ## E
|
||||
[console]::beep(523,250) ## C
|
||||
[console]::beep(587,225) ## D
|
||||
[console]::beep(494,225) ## B
|
||||
exit 0
|
27
Scripts/play-the-imperial-march.ps1
Executable file
27
Scripts/play-the-imperial-march.ps1
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./play-the-imperial-march.ps1
|
||||
.DESCRIPTION plays the Imperial March (Star Wars)
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
[console]::beep(440,500)
|
||||
[console]::beep(440,500)
|
||||
[console]::beep(440,500)
|
||||
[console]::beep(349,350)
|
||||
[console]::beep(523,150)
|
||||
[console]::beep(440,500)
|
||||
[console]::beep(349,350)
|
||||
[console]::beep(523,150)
|
||||
[console]::beep(440,1000)
|
||||
[console]::beep(659,500)
|
||||
[console]::beep(659,500)
|
||||
[console]::beep(659,500)
|
||||
[console]::beep(698,350)
|
||||
[console]::beep(523,150)
|
||||
[console]::beep(415,500)
|
||||
[console]::beep(349,350)
|
||||
[console]::beep(523,150)
|
||||
[console]::beep(440,1000)
|
||||
exit 0
|
@ -24,7 +24,7 @@ try {
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
write-error "Sorry, no German text-to-speech (TTS) voice found"
|
||||
write-error "No German text-to-speech (TTS) voice found"
|
||||
exit 1
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user