Skip to main content

Invoke-ASPublish

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 ConfigMgr, 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 -PackageIDs "75,80" -TargetGroup "Applications\Marketing" ‑Password "ABC1234"

Use the following command to publish assignments to Intune:

Invoke-ASPublish -ConnectionName "Intune"-ApplicationID 35 -PublishAssignment “False”

Parameters

The Invoke-ASPublish cmdlet has the following parameters:

ParameterDescription
ConnectionNameUse to specify named connection to a deployment system. See Creating Multiple Named Connections to Distribution Systems for more information.
ApplicationIDSpecify the ApplicationID of the application you are publishing.
PackageIDsSpecify the PackageIDs of the application that you are publishing. It is an optional parameter. If you do not specify PackageIDs parameter then entire application will be published.
[TargetGroup]Specify the target group on the deployment server that you want to publish this application to. 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.
PublishAssignment(Optional) Specify one of the following: 0 1 By default, the PublishAssignment will be set to 0 . If PublishAssignment is set to 1 , then it will publish assignments to Intune. It is applicable to Intune Distribution System.
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.