I'm trying to export the Microsoft Teams provisioning package using PowerShell, but it seems to be failing. The command I'm using is: Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -eq "MicrosoftTeams"} | Export-ProvisioningPackage -OutputFolder "c:microsoftteams". Can anyone explain why this isn't working?
4 Answers
You won't easily find the built-in Teams Appx package as an exportable file; it's part of the Windows image. Instead of trying to pipe commands together, consider using DISM to handle this. You can mount the Windows image and list the provisioned packages. Just keep in mind that extracting Appx packages directly isn't straightforward, so prepare for some manual work.
The issue here is that the output from Get-AppxProvisionedPackage isn't compatible with Export-ProvisioningPackage. These two commands belong to different modules and serve different purposes. Export-ProvisioningPackage is intended to handle provisioning package projects, not AppxProvisionedPackage objects. If you want to back up the Teams package, you'll need to manually download the installer or use Windows Configuration Designer to create a provisioning package.
I didn't know we couldn't just extract it from the store. Thanks for clarifying!
You might run into further complications with DISM and Teams since it's not designed to export all app types cleanly. For deploying Teams, I'd suggest looking into Intune to manage it more effectively, which can handle those installations during the initial setup.
Have you tried using winget to download it instead? It's a simpler solution if you're just looking to get Teams installed.

I see! What steps are involved in using DISM for this?