Rename to open-default-browser.ps1

This commit is contained in:
Markus Fleschutz
2021-11-23 07:45:50 +01:00
parent 2e5be6ac68
commit af8f300a40
134 changed files with 141 additions and 153 deletions

View File

@ -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))"