Add several open-* scripts

This commit is contained in:
Markus Fleschutz 2021-10-28 14:30:17 +02:00
parent 1a172841cb
commit 37b937af7a
8 changed files with 136 additions and 1 deletions

20
Scripts/open-bing-maps.ps1 Executable file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Bing Maps app
.DESCRIPTION
This script launches the Bing Maps application.
.EXAMPLE
PS> ./open-bing-maps
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process bingmaps:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

View File

@ -12,7 +12,7 @@
#>
try {
start-process calc.exe
start-process ms-calculator:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"

20
Scripts/open-clock.ps1 Executable file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Clock app
.DESCRIPTION
This script launches the Clock application.
.EXAMPLE
PS> ./open-clock
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process ms-clock:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

20
Scripts/open-cortana.ps1 Executable file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Cortana app
.DESCRIPTION
This script launches the Cortana application.
.EXAMPLE
PS> ./open-cortana
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process ms-cortana2:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

View File

@ -0,0 +1,15 @@
<#
.SYNOPSIS
Opens Google Calendar
.DESCRIPTION
This script launches the Web browser with the Google Calendar website.
.EXAMPLE
PS> ./open-google-calendar
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
& "$PSScriptRoot/open-browser.ps1" "https://calendar.google.com"
exit 0 # success

View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Microsoft Paint app
.DESCRIPTION
This script launches the Microsoft Paint application.
.EXAMPLE
PS> ./open-microsoft-paint
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process ms-paint:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Microsoft Teams app
.DESCRIPTION
This script launches the Microsoft Teams application.
.EXAMPLE
PS> ./open-microsoft-teams
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process msteams:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

20
Scripts/open-remote-desktop.ps1 Executable file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Launches the Remote Desktop app
.DESCRIPTION
This script launches the Remote Desktop application.
.EXAMPLE
PS> ./open-remote-desktop
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
start-process ms-rd:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}