Renamed to open/close-*-browser.ps1

This commit is contained in:
Markus Fleschutz
2021-11-21 11:51:43 +01:00
parent bf3910a180
commit 15e055456a
8 changed files with 27 additions and 17 deletions

View File

@ -0,0 +1,28 @@
<#
.SYNOPSIS
Launches the Firefox browser
.DESCRIPTION
This script launches the Mozilla Firefox Web browser.
.EXAMPLE
PS> ./open-firefox-browser
.PARAMETER URL
Specifies an optional URL
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$URL = "")
try {
if ("$URL" -ne "") {
start-process firefox.exe "$URL"
} else {
start-process firefox.exe
}
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}