mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 21:46:43 +01:00
Add two scripts
This commit is contained in:
parent
27c61eb807
commit
d2012b1ee3
15
Scripts/close-one-calendar.ps1
Normal file
15
Scripts/close-one-calendar.ps1
Normal 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
|
20
Scripts/open-microsoft-weather.ps1
Normal file
20
Scripts/open-microsoft-weather.ps1
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user