Set-ASAssignments

AdminStudio 2024 | 27.0 | AdminStudio PowerShell Cmdlets

Edition: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:

Set-ASAssignments Parameters

Parameter

Description

ApplicationID

(Required) Specifies the ID for the application which contains the assignment.

AssignmentID

(Required) Use to specify the assignment ID which is being updated.

Note: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.

Note:This parameter is mandatory only when adding new Assignment.

Group

Specifies the group.

Note: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.

Note: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.