Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
The Add-AppxProvisionedPackage
cmdlet is a powerful tool in Windows used to add a provisioned app package (.appx or .appxbundle) to a Windows image. This is particularly useful for IT administrators who need to deploy applications across multiple devices in an enterprise environment. Provisioned app packages are installed for every user who logs onto the device. This cmdlet is part of the DISM (Deployment Imaging Service and Management) module, which is essential for managing Windows images.
Examples:
Adding a Provisioned App Package to an Offline Image:
To add a provisioned app package to an offline Windows image, follow these steps:
Mount the Windows image:
Mount-WindowsImage -ImagePath "C:\Images\install.wim" -Index 1 -Path "C:\Mount"
Add the provisioned app package:
Add-AppxProvisionedPackage -Path "C:\Mount" -PackagePath "C:\Packages\MyApp.appx" -LicensePath "C:\Licenses\MyApp.license.xml"
Commit the changes and unmount the image:
Dismount-WindowsImage -Path "C:\Mount" -Save
Adding a Provisioned App Package to an Online Image:
To add a provisioned app package to an online (currently running) Windows image, use the following commands:
Add-AppxProvisionedPackage -Online -PackagePath "C:\Packages\MyApp.appx" -LicensePath "C:\Licenses\MyApp.license.xml"
Removing a Provisioned App Package:
If you need to remove a provisioned app package from a Windows image, you can use the Remove-AppxProvisionedPackage
cmdlet:
For an offline image:
Remove-AppxProvisionedPackage -Path "C:\Mount" -PackageName "MyApp_1.0.0.0_neutral__8wekyb3d8bbwe"
For an online image:
Remove-AppxProvisionedPackage -Online -PackageName "MyApp_1.0.0.0_neutral__8wekyb3d8bbwe"
These examples illustrate how to manage provisioned app packages using PowerShell commands in a Windows environment. This is particularly useful for automating the deployment of applications in a consistent manner across multiple devices.