mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-25 06:24:14 +02:00
Updated open-default-browser.ps1
This commit is contained in:
parent
cdedba1974
commit
db0c7af072
@ -6,19 +6,19 @@
|
||||
.PARAMETER URL
|
||||
Specifies the URL
|
||||
.EXAMPLE
|
||||
PS> ./open-default-browser
|
||||
PS> ./open-default-browser.ps1
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([string]$URL = "http://www.fleschutz.de")
|
||||
param([string]$URL = "https://www.fleschutz.de")
|
||||
|
||||
try {
|
||||
Start-Process $URL
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
"⚠️ ERROR: $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user