Add open-mozilla-firefox.ps1 and rename to close-mozilla-firefox.ps1

This commit is contained in:
Markus Fleschutz 2021-10-29 13:02:03 +02:00
parent a5d61a40b0
commit 8274022544
7 changed files with 126 additions and 3 deletions

View File

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

1 Script Description
44 close-calculator.ps1 Closes the calculator program gracefully
45 close-cortana.ps1 Closes Cortana gracefully
46 close-file-explorer.ps1 Closes Microsoft File Explorer gracefully
close-firefox.ps1 Closes the Firefox Web browser
47 close-google-chrome.ps1 Closes the Google Chrome Web browser
48 close-program.ps1 Closes the given program gracefully
49 close-microsoft-edge.ps1 Closes the Microsoft Edge Web browser
50 close-microsoft-store.ps1 Closes the Microsoft Store app
51 close-mozilla-firefox.ps1 Closes the Mozilla Firefox Web browser
52 close-netflix.ps1 Closes the Netflix application gracefully
53 close-onedrive.ps1 Closes Microsoft OneDrive gracefully
54 close-serenade.ps1 Closes the Serenade.ai application gracefully

View 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*

View 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*

View 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*

View File

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

View File

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

View 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
}