mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-15 19:21:04 +01:00
Add install-basic-snaps.ps1
This commit is contained in:
parent
730e30d25e
commit
3a08a627aa
26
Scripts/install-basic-snaps.ps1
Normal file
26
Scripts/install-basic-snaps.ps1
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user