Invoke-ASImportPackage

AdminStudio 2020 | 19.0 | AdminStudio PowerShell Cmdlets

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:

Invoke_ASImportPackage 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.

Return Values

A success or failure message is returned.