mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-29 10:09:37 +01:00
29 lines
575 B
PowerShell
Executable File
29 lines
575 B
PowerShell
Executable File
<#
|
|
.SYNOPSIS
|
|
Launches the Mozilla Firefox Web browser
|
|
.DESCRIPTION
|
|
This script launches the Mozilla Firefox Web browser.
|
|
.EXAMPLE
|
|
PS> ./open-mozilla-firefox
|
|
.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
|
|
}
|