Add two scripts

This commit is contained in:
Markus Fleschutz 2021-11-12 21:50:06 +01:00
parent 27c61eb807
commit d2012b1ee3
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<#
.SYNOPSIS
Closes the OneCalendar app
.DESCRIPTION
This script closes the OneCalendar application gracefully.
.EXAMPLE
PS> ./close-one-calendar
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
taskkill /f /im CalendarApp.Gui.Win10.exe
exit 0 # success

View File

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