Add install-basic-snaps.ps1

This commit is contained in:
Markus Fleschutz 2023-04-01 19:38:27 +02:00
parent 730e30d25e
commit 3a08a627aa

View File

@ -0,0 +1,26 @@
<#
.SYNOPSIS
Installs basic snaps
.DESCRIPTION
This PowerShell script installs basic Windows apps such as browser, e-mail client, etc.
.EXAMPLE
PS> ./install-basic-snaps
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
$StopWatch = [system.diagnostics.stopwatch]::startNew()
"⏳ (1/1) Installing ant..."
snap install ant
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ installed basic snaps in $Elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}