mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-13 06:27:16 +02:00
Rename to open-default-browser.ps1
This commit is contained in:
@ -6,21 +6,17 @@
|
||||
.EXAMPLE
|
||||
PS> ./open-firefox-browser
|
||||
.PARAMETER URL
|
||||
Specifies an optional URL
|
||||
Specifies an URL
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
param([string]$URL = "")
|
||||
param([string]$URL = "http://www.fleschutz.de")
|
||||
|
||||
try {
|
||||
if ("$URL" -ne "") {
|
||||
start-process firefox.exe "$URL"
|
||||
} else {
|
||||
start-process firefox.exe
|
||||
}
|
||||
start-process firefox.exe "$URL"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
|
Reference in New Issue
Block a user