mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-15 12:34:25 +01:00
29 lines
575 B
PowerShell
29 lines
575 B
PowerShell
|
<#
|
|||
|
.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
|
|||
|
}
|