Invoke-ASImportPackage
Edition:Powershell cmdlets are enabled with AdminStudio Enterprise Edition and with Workflow Manager.
The Invoke-ASImportPackage cmdlet invokes the import process on a single package.
Examples
In this example, the Orca.msi package from the given path is imported, as well as the specified transform file.
Invoke-ASImportPackage-PackagePath C:\Packages\Orca\Orca.msi-Transforms c:\Packages\Orca\Orca.mst
You can also import .exe files into the Application Catalog using the Invoke‑ASImportPackage cmdlet:
Invoke-ASImportPackage-PackagePath C:\Packages\ABCapp\ABC.exe
Parameters
The Invoke_ASImportPackage cmdlet has the following parameters:
Parameter |
Description |
PackagePath |
Specify the path to the package to be imported. |
[Group] |
Use to specify the group into which the package will be imported. When specifying the Group parameter, you need to include the Applications root group in the path to the group. For example: Invoke-ASImportPackage -PackagePath C:\Packages\Orca\Orca.msi -Group "Applications\SubGroup\SubGroup1" If you do not include the Applications root group in the path, the packages will be imported under the root node instead of the specified folder path. |
[Transforms] |
List of transforms to apply during the import process. Specify the full paths. When specifying multiple transform files, use commas to separate them. |
[Patches] |
List of patches to apply during the import process. Specify the full paths. When specifying multiple patches, use commas to separate them. |
[InstallCommandLine] |
Use to set the package’s Install command line property. This property will be transferred to ConfigMgr (Formerly called as System Center Configuration Manager) when the package’s application is published. Invoke-ASImportPackage -PackagePath "C:\Packages\Calc2020\Calc2020.msi" ‑InstallCommandLine "msiexec /i 'Calc2020.msi'" |
[ExistingPackageId] |
In the case of reimporting an existing package, use this parameter to specify the existing package’s ID. |
PackageFeedId |
Identify the package you want to download. Invoke-ASImportPackage -PackagePath "C:\Program Files (x86)\AdminStudio Shared\Package Feed Downloads\Notepad++ Team\Notepad++ (x86)\7.9.5" -PackageFeedId 143 |
IsCustomization |
Choose one of the following option: 0 - If you choose this option, custom.mst file will not be generated. 1 - If you select this option, custom.mst file will generate Invoke-ASImportPackage -PackagePath 'D:\AdminStudio Shared\Package Feed Downloads\Box\Box Notes\1.4.0\BoxNotesSetup.exe' -PackageFeedId '3075' -IsCustomization 0 |
Return Values
A success or failure message is returned.