Add open-notepad.ps1

This commit is contained in:
Markus Fleschutz
2021-10-23 16:29:54 +02:00
parent f07931b8b4
commit d7e954417d
4 changed files with 48 additions and 0 deletions

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

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