Invoke-ASPublish

AdminStudio 2020 | 19.0 | AdminStudio PowerShell Cmdlets

Edition:Powershell cmdlets are enabled with AdminStudio Enterprise Edition and with Workflow Manager.

Use the Invoke-ASPublish cmdlet to publish a package to a deployment server, such as System Center 2012 Configuration Manager, Citrix XenApp Server, Symantec Altiris Server, or Workspace ONE Server. For publishing, an ApplicationID is needed instead of a PackageID.

Tip:If you have the PackageID, you can determine the ApplicationID by using the Get-ASApplicationID cmdlet.

Specifying an Import-Module Cmdlet

Because publishing requires AdminStudio.SCCM.Integrator.dll, you need to specify an Import-Module cmdlet either in your PowerShell session or in the PowerShell script.

You can import this module for your PowerShell session as shown below:

Import-Module-Name [AdminStudioInstallDirectory]\Common\AdminStudio.SCCM.Integrator.dll

You can either specify this import in your PowerShell script or in a PowerShell session at the command prompt.

Examples

First, use a package’s PackageID to obtain its ApplicationID:

$oAppID = Get-ASApplicationID-PackageID 10

Then, use the ApplicationID to publish the package:

Invoke-ASPublish-ConnectionName "SCCM12"-ApplicationID 35-TargetGroup "Applications\Marketing"‑Password "ABC1234"

Parameters

The Invoke-ASPublish cmdlet has the following parameters:

Invoke-ASPublish Parameters

Parameter

Description

ConnectionName

Use to specify named connection to a deployment system. See Creating Multiple Named Connections to Distribution Systems for more information.

ApplicationID

Specify the ApplicationID of the application you are publishing.

[TargetGroup]

Specify the target group on the deployment server that you want to publish this application to.

Note:If you publish an application with an empty Target Group to Workspace ONE server, the application will be published to the default organization group to which the particular Workspace ONE user belongs to.

[Password]

Specify the password of the deployment server you are publishing to.

Note:Workspace ONE permits publishing a single application only once to an Organization Group. Therefore, if you attempt to publish an application to an Workspace ONE Organization Group that already contains that application, the publication will fail.

Return Values

A success or failure message is returned.