• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Applications

One-Liner Wednesday January 11, 2023

January 11, 2023 by ClaytonT 2 Comments

It’s Wednesday already, is that good or bad for you? Hoping it’s a good thing, and hoping todays one-liner makes it even better.

$Path = $env:TEMP; $Installer = 'chrome_installer.exe'; Invoke-WebRequest -Uri 'http://dl.google.com/chrome/install/375.126/chrome_installer.exe' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args '/silent /install' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer

What this one-liner will do is go out and fetch chrome and silently install or update it. Then it will delete the installer after it has been installed. You could add lines for logging in case you had other software that you wanted to install after, but I feel this is a great foundation if you’ve never done it before. If you start adding logging and other features(ie. confirming it has installed), I’d definitely take it out of the one-liner format for ease of reading/troubleshooting unless for some reason you need to keep it as a one-liner.

You can do this with many applications, you just have to make sure the URI and switches(Args) are correct.

Tagged With: App Deployment, Applications, One Liner Wednesday, PowerShell

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • One-Liner Wednesday January 25, 2023
  • Module Monday January 23, 2023
  • One-Liner Wednesday January 18, 2023
  • Module Monday January 16, 2023
  • Read-Only Friday January 13, 2023

Categories

  • 365
  • Active Directory
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent