mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-18 00:20:09 +02:00
Update the manuals in Docs/
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## open-default-browser.ps1 - Opens the default browser
|
||||
## The open-default-browser.ps1 PowerShell Script
|
||||
|
||||
This PowerShell script launches the default Web browser, optional with a given URL.
|
||||
|
||||
@@ -32,4 +32,30 @@ Author: Markus Fleschutz | License: CC0
|
||||
## Related Links
|
||||
https://github.com/fleschutz/PowerShell
|
||||
|
||||
## Source Code
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Opens the default browser
|
||||
.DESCRIPTION
|
||||
This PowerShell script launches the default Web browser, optional with a given URL.
|
||||
.PARAMETER URL
|
||||
Specifies the URL
|
||||
.EXAMPLE
|
||||
PS> ./open-default-browser
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([string]$URL = "http://www.fleschutz.de")
|
||||
|
||||
try {
|
||||
Start-Process $URL
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
||||
*Generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1*
|
||||
|
Reference in New Issue
Block a user