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
|
.PARAMETER URL
|
||||||
Specifies the URL
|
Specifies the URL
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./open-default-browser
|
PS> ./open-default-browser.ps1
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz | License: CC0
|
Author: Markus Fleschutz | License: CC0
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$URL = "http://www.fleschutz.de")
|
param([string]$URL = "https://www.fleschutz.de")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Start-Process $URL
|
Start-Process $URL
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ ERROR: $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user