mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Add open-mozilla-firefox.ps1 and rename to close-mozilla-firefox.ps1
This commit is contained in:
parent
a5d61a40b0
commit
8274022544
@ -44,11 +44,11 @@ clone-repos.ps1, Clones well-known Git repositories
|
||||
close-calculator.ps1, Closes the calculator program gracefully
|
||||
close-cortana.ps1, Closes Cortana gracefully
|
||||
close-file-explorer.ps1, Closes Microsoft File Explorer gracefully
|
||||
close-firefox.ps1, Closes the Firefox Web browser
|
||||
close-google-chrome.ps1, Closes the Google Chrome Web browser
|
||||
close-program.ps1, Closes the given program gracefully
|
||||
close-microsoft-edge.ps1, Closes the Microsoft Edge Web browser
|
||||
close-microsoft-store.ps1, Closes the Microsoft Store app
|
||||
close-mozilla-firefox.ps1, Closes the Mozilla Firefox Web browser
|
||||
close-netflix.ps1, Closes the Netflix application gracefully
|
||||
close-onedrive.ps1, Closes Microsoft OneDrive gracefully
|
||||
close-serenade.ps1, Closes the Serenade.ai application gracefully
|
||||
|
|
26
Docs/close-mozilla-firefox.md
Normal file
26
Docs/close-mozilla-firefox.md
Normal file
@ -0,0 +1,26 @@
|
||||
## close-mozilla-firefox.ps1 - Closes Mozilla's Firefox Web browser
|
||||
|
||||
This script closes Mozilla's Firefox Web browser gracefully.
|
||||
|
||||
## Parameters
|
||||
```powershell
|
||||
close-mozilla-firefox.ps1 [<CommonParameters>]
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||
```
|
||||
|
||||
## Example
|
||||
```powershell
|
||||
PS> ./close-mozilla-firefox
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
|
||||
## Related Links
|
||||
https://github.com/fleschutz/PowerShell
|
||||
|
||||
*Generated by convert-ps2md.ps1 using the comment-based help of close-mozilla-firefox.ps1*
|
35
Docs/open-google-chrome.md
Normal file
35
Docs/open-google-chrome.md
Normal file
@ -0,0 +1,35 @@
|
||||
## open-google-chrome.ps1 - Launches the Google Chrome Web browser
|
||||
|
||||
This script launches the Google Chrome Web browser.
|
||||
|
||||
## Parameters
|
||||
```powershell
|
||||
open-google-chrome.ps1 [[-URL] <String>] [<CommonParameters>]
|
||||
|
||||
-URL <String>
|
||||
Specifies an optional URL
|
||||
|
||||
Required? false
|
||||
Position? 1
|
||||
Default value
|
||||
Accept pipeline input? false
|
||||
Accept wildcard characters? false
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||
```
|
||||
|
||||
## Example
|
||||
```powershell
|
||||
PS> ./open-google-chrome
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
|
||||
## Related Links
|
||||
https://github.com/fleschutz/PowerShell
|
||||
|
||||
*Generated by convert-ps2md.ps1 using the comment-based help of open-google-chrome.ps1*
|
35
Docs/open-mozilla-firefox.md
Normal file
35
Docs/open-mozilla-firefox.md
Normal file
@ -0,0 +1,35 @@
|
||||
## open-mozilla-firefox.ps1 - Launches the Mozilla Firefox Web browser
|
||||
|
||||
This script launches the Mozilla Firefox Web browser.
|
||||
|
||||
## Parameters
|
||||
```powershell
|
||||
open-mozilla-firefox.ps1 [[-URL] <String>] [<CommonParameters>]
|
||||
|
||||
-URL <String>
|
||||
Specifies an optional URL
|
||||
|
||||
Required? false
|
||||
Position? 1
|
||||
Default value
|
||||
Accept pipeline input? false
|
||||
Accept wildcard characters? false
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||
```
|
||||
|
||||
## Example
|
||||
```powershell
|
||||
PS> ./open-mozilla-firefox
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
|
||||
## Related Links
|
||||
https://github.com/fleschutz/PowerShell
|
||||
|
||||
*Generated by convert-ps2md.ps1 using the comment-based help of open-mozilla-firefox.ps1*
|
@ -97,7 +97,6 @@ Mega Collection of PowerShell Scripts
|
||||
| [close-calculator.ps1](Scripts/close-calculator.ps1) | Closes the calculator application | [Help](Docs/close-calculator.md) |
|
||||
| [close-cortana.ps1](Scripts/close-cortana.ps1) | Closes Cortana | [Help](Docs/close-cortana.md) |
|
||||
| [close-file-explorer.ps1](Scripts/close-file-explorer.ps1) | Closes Microsoft File Explorer | [Help](Docs/close-file-explorer.md) |
|
||||
| [close-firefox.ps1](Scripts/close-firefox.ps1) | Closes the Firefox Web browser | [Help](Docs/close-firefox.md) |
|
||||
| [close-google-chrome.ps1](Scripts/close-google-chrome.ps1)| Closes the Google Chrome Web browser | [Help](Docs/close-google-chrome.md) |
|
||||
| [close-program.ps1](Scripts/close-program.ps1) | Closes the given program gracefully | [Help](Docs/close-program.md) |
|
||||
| [close-microsoft-edge.ps1](Scripts/close-microsoft-edge.ps1)| Closes the Microsoft Edge Web browser | [Help](Docs/close-microsoft-edge.md) |
|
||||
|
@ -4,7 +4,7 @@
|
||||
.DESCRIPTION
|
||||
This script closes Mozilla's Firefox Web browser gracefully.
|
||||
.EXAMPLE
|
||||
PS> ./close-firefox
|
||||
PS> ./close-mozilla-firefox
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
28
Scripts/open-mozilla-firefox.ps1
Executable file
28
Scripts/open-mozilla-firefox.ps1
Executable file
@ -0,0 +1,28 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Launches the Mozilla Firefox Web browser
|
||||
.DESCRIPTION
|
||||
This script launches the Mozilla Firefox Web browser.
|
||||
.EXAMPLE
|
||||
PS> ./open-mozilla-firefox
|
||||
.PARAMETER URL
|
||||
Specifies an optional URL
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
param([string]$URL = "")
|
||||
|
||||
try {
|
||||
if ("$URL" -ne "") {
|
||||
start-process firefox.exe "$URL"
|
||||
} else {
|
||||
start-process firefox.exe
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user