mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 21:33:47 +02:00
Add install-wsl.ps1
This commit is contained in:
@ -12,12 +12,16 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
$Path = $env:TEMP;
|
||||
$Installer = "chrome_installer.exe"
|
||||
Invoke-WebRequest "http://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path\$Installer
|
||||
Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait
|
||||
Remove-Item $Path\$Installer
|
||||
write-host -foregroundColor green "✔️ installed Google Chrome"
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ installed Google Chrome in $Elapsed sec"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user