Sideload an app
After sideloading is enabled, you can sideload the app using the AppX Windows PowerShell module and the associated cmdlets. To manually sideload an app for the currently logged-in user, perform the following steps from a Windows PowerShell prompt:
Enter Add-appxpackage “path and name of the app” to add the app. Table 4-2 shows the available AppX cmdlets. If you need to add app dependencies, use this command: Add-appxpackage C:\MyApp.appx DependencyPath C:\appplus.appx.
The app installs and then is available to the user. If multiple users share a single computer, follow the process for each user. The AppX module for Windows PowerShell includes several cmdlets that you can use to install and manage LOB Microsoft store apps, some of which are described in Table 4-2.
TABLE 4-2 Cmdlets in the AppX module for Windows PowerShell
Cmdlet | Description |
Add-AppxPackage | Add a signed app package to a single user account. |
Get-AppxLastError | Review the last error reported in the app package installation logs. |
Get-AppxLog | Review the app package installation log. |
Get-AppxPackage | View a list of the app packages installed for a user profile. |
Get-AppxPackageManifest | Read the manifest of an app package. |
Remove-AppxPackage | Remove an app package from a user account. |
Use DISM to sideload apps into Windows images
If you want to sideload the apps to multiple computers, use Deployment Image Servicing and Management (DISM) commands. You can use DISM commands to manage app packages in a Windows image. When you use DISM to provision app packages, those packages are added to a Windows image and are installed for the desired users when they next log on to their computers.
You should be familiar with the DISM syntax when servicing a Windows image, whether a computer is offline or online. Table 4-3 describes a few cmdlets to keep in mind.
TABLE 4-3 Commands for use with DISM
Command | Description |
DISM.exe {/Image:<path_to_image_directory> | /Online} [dism_global_options] {servicing_option} [<servicing_argument>] | To service a Windows image with DISM |
DISM.exe /Image:<path_to_image_directory> [/Get-Provisioned AppxPackages | /Add-ProvisionedAppxPackage | /Remove-ProvisionedAppxPackage | /Set-ProvisionedAppxDataFile] | To service an app package (.appx or .appxbundle) for an offline image |
DISM.exe /Online [/Get-ProvisionedAppxPackages | /Add-ProvisionedAppxPackage | /Remove-ProvisionedAppxPackage | /Set-ProvisionedAppxDataFile | To service an app package (.appx or .appxbundle) for a running operating system |
Other command-line service options include /Get-ProvisionedAppxPackages, /FolderPath, /PackagePath, /LicensePath, and /Add-ProvisionedAppxPackage. Becoming familiar with these options is very important because you’ll likely be tested on them. You can learn about all available commands and options at https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-app-package–appx-or-appxbundle–servicing-command-line-options. Review this article and be sure that you can make sense of commands you might come across, such as
Click here to view code image
Dism /Online /Add-ProvisionedAppxPackage /FolderPath:C:\Test\Apps\MyUnpackedApp
/SkipLicense
Another example is:
Click here to view code image
Dism /Image:C:\test\offline /Add-ProvisionedAppxPackage /FolderPath:c:\Test\Apps\
MyUnpackedApp /CustomDataPath:c:\Test\Apps\CustomData.xml