This PowerShell script installs the Mozilla Firefox browser from Microsoft Store.
PS> ./install-firefox.ps1 [<CommonParameters>]
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.PS> ./install-firefox.ps1
⏳ Installing Mozilla Firefox from Microsoft Store...
✅ Mozilla Firefox installed successfully in 25s.
Author: Markus Fleschutz | License: CC0
https://github.com/fleschutz/PowerShell
<#
.SYNOPSIS
Installs Mozilla Firefox
.DESCRIPTION
This PowerShell script installs the Mozilla Firefox browser from Microsoft Store.
.EXAMPLE
PS> ./install-firefox.ps1
⏳ Installing Mozilla Firefox from Microsoft Store...
✅ Mozilla Firefox installed successfully in 25s.
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
#requires -version 5.1
try {
"⏳ Installing Mozilla Firefox from Microsoft Store..."
$stopWatch = [system.diagnostics.stopwatch]::startNew()
& winget install --id 9NZVDKPMR9RD --source msstore --accept-package-agreements --accept-source-agreements
if ($lastExitCode -ne 0) { throw "Can't install Mozilla Firefox - maybe it's already installed" }
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Mozilla Firefox installed successfully in $($elapsed)s."
exit 0 # success
} catch {
"⚠️ ERROR: $($Error[0]) (in script line $($_.InvocationInfo.ScriptLineNumber))"
exit 1
}(page generated by convert-ps2md.ps1 as of 04/19/2026 17:56:59)