Skip to content

Instantly share code, notes, and snippets.

@ekardon
Created November 27, 2021 16:41
Show Gist options
  • Save ekardon/008ff26403bc05fe8745e10f90b39de7 to your computer and use it in GitHub Desktop.
Save ekardon/008ff26403bc05fe8745e10f90b39de7 to your computer and use it in GitHub Desktop.
Appx installer with dependencies
<#
Folder structure:
./
├─ Main.appxbundle
├─ Dependencies/
├─ Dependency1.appx
├─ Dependency2.appx
#>
$DependencyFolderPath = "Dependencies"
$AppxbundlePath = "."
$Dependencies = Get-ChildItem -Path $DependencyFolderPath -Filter "*.appx*" | Select-Object -ExpandProperty FullName
$FullPathtoAppxbundle = Get-ChildItem -Path $AppxbundlePath -Filter "*.appx*" | Select-Object -ExpandProperty FullName
Add-AppxPackage -Path $FullPathtoAppxbundle -DependencyPath $Dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment