Function to handle Add-AppxProvisionedPackage

Like we have a function to handle Windows installer installation, has someone created a function to handle Add-AppxProvisionedPackage?

What is wrong with the built-in Add-AppxProvisionedPackage function?

If you are looking for adding logging, this will help:
Logging for non-PSADT commands - The Toolkit / Tips & Tricks - PSAppDeployToolkit Community

If you have an idea of what you want, maybe others users (****cough **** LFM8787 ****cough ****) will create it for you.

Nothing wrong. But there might be various commandline parameters and those command line might be complexe. So a function might be helpfull.


For example:

set-variable -name Hash_MSIXs -visibility public -Scope Script `
					-Value @(

$ret = Add-AppxProvisionedPackage -Online -PackagePath $($msix.msix) -LicensePath $($msix.ParLicense) -DependencyPackagePath $($msix.Par_Depend) -Region all

This would be failing

But using:

$ret = Add-AppxProvisionedPackage -Online -PackagePath $($msix.msix) -LicensePath $($msix.ParLicense) -DependencyPackagePath $Str_frameworkPath,$Str_runtimePath,$Str_vcLibsPath -Region all

Would be working.