diff --git a/Scripts/close-one-calendar.ps1 b/Scripts/close-one-calendar.ps1 new file mode 100644 index 00000000..f763a04a --- /dev/null +++ b/Scripts/close-one-calendar.ps1 @@ -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 diff --git a/Scripts/open-microsoft-weather.ps1 b/Scripts/open-microsoft-weather.ps1 new file mode 100644 index 00000000..f73dcd79 --- /dev/null +++ b/Scripts/open-microsoft-weather.ps1 @@ -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 +}