Skip to main content

Set-ASAssignments

AdminStudio 2025 | 29.0 | AdminStudio PowerShell Cmdlets

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

Use the Set-ASAssignments cmdlet to add new assignment or update the existing assignments for the specified application.

Examples

Adding New Assignments:

Set-ASAssignments -ApplicationID 6 -InstallIntent “Required” -GroupMode “Included” -AssignmentType “AllUsers”

Set-ASAssignments -ApplicationID 8 -InstallIntent “Availbleforenrolleddevices” -GroupMode “Included” -AssignmentType “AddGroup” -Group “AS2”

Updating Existing Assignments:

Set-ASAssignments -ApplicationID 6 -AssignmentID 3 -GroupMode “Included” (Assignments with Add Group)

Set-ASAssignments -ApplicationID 6 -AssignmentID 2 -InstallIntent “Required” (Assignments with All Users/ All Devices)

Parameters

The cmdlet includes the following parameters:

ParameterDescription
ApplicationID(Required) Specifies the ID for the application which contains the assignment.
AssignmentID(Required) Use to specify the assignment ID which is being updated. This parameter is mandatory only when updating the existing Assignments.
GroupMode(Required) Specifies the group mode.
InstallIntent(Required) Specifies the install intent.
AssignmentType(Required) Specifies the assignment type. This parameter is mandatory only when adding new Assignment.
GroupSpecifies the group. If AssignmentType is set to AddGroup , then the Group parameter will be mandatory.
note

The API will disregard if any additional parameters or values provided during the update. Based on the group of assignments the cmdlet will allow GroupMode or InstallIntent value while updating.

Return Values

Returns the value of the Assignment ID upon a successful adding/updating Assignments.