indospot

Winget_install_script.ps1

Aug 20th, 2025
3,003
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 1.12 KB | Software | 0 0
  1. # This script requires winget to be installed. install it from the Microsoft Store if it doesn't work.  https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1
  2.  
  3. # It's best to run this script as an administrator
  4.  
  5. # Edit the app list to fit your needs before running the script.
  6.  
  7. Write-Output "The script will now install all your apps. Feel free to grab a coffee or keep working on something else!"
  8.  
  9. $apps = @(
  10.     @{name = "Vivaldi.Vivaldi" },
  11.     @{name = "Microsoft.PowerToys" },
  12.     @{name = "Beeper.Beeper" },
  13.     @{name = "Tailscale.Tailscale" },
  14.     @{name = "Nextcloud.NextcloudDesktop" },
  15.     @{name = "Flow-Launcher.Flow-Launcher" },
  16.     @{name = "Balena.Etcher" },
  17.     @{name = "Adobe.CreativeCloud" },
  18.     @{name = "Kingsoft.WPSOffice" }
  19. );
  20.  
  21. Foreach ($app in $apps) {
  22.     $listApp = winget list --exact -q $app.name
  23.     if (![String]::Join("", $listApp).Contains($app.name)) {
  24.         Write-host "Installing" $app.name
  25.         winget install -e -h --accept-source-agreements --accept-package-agreements --id $app.name
  26.     }
  27.     else {
  28.         Write-host "Skipping" $app.name "(already installed)"
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment