Invoke-StartDirectToGroupAssignmentMigration
As an admin, you can trigger a new direct assignments to group policy assignments migration.
Syntax
Default (Default)
Invoke-StartDirectToGroupAssignmentMigration
-Authority <String>
-PolicyType <String>
-PolicyName <String>
-GroupId <Guid>
[-AllowNonEmptyGroup <Boolean>]
[<CommonParameters>]
Description
As an admin, you can trigger a new direct assignments to group policy assignments migration for a specific authority, instance document and group id. The migration will be automatic and will move all the users that have the direct assignment with the provided parameters to the group provided and will apply the correct group policy assignment, removing after all the exiting direct assignments to avoid any conflict. At the end the behavior will be the same one but the admin will have now to manage only a group instead of a bunch of direct assignments.
This is only applicable for tenants who have activated the new features related to group policy assignment adoption.
Examples
Example 1
PS C:\> Invoke-startDirectToGroupAssignmentMigration -Authority Tenant -PolicyType TeamsCallingPolicy -PolicyName Test-Gpa-Adoption-Policy-2 -GroupId cde9a331-5bf8-415c-990c-19838b0d898c
In this example, the Invoke-startDirectToGroupAssignmentMigration cmdlet is used to trigger the direct assignment to group policy assignment migration for the instance document with policy type TeamsCallingPolicy and name Test-Gpa-Adoption-Policy-2 to the group cde9a331-5bf8-415c-990c-19838b0d898c. In this case the flag allowNonEmptyGroup is not provided and the default will be false which means if the group provided already have an active group policy assignment the operation wont be trigger.
Example 2
PS C:\> Invoke-startDirectToGroupAssignmentMigration -Authority Tenant -PolicyType TeamsCallingPolicy -PolicyName Test-Gpa-Adoption-Policy-2 -GroupId cde9a331-5bf8-415c-990c-19838b0d898c -allowNonEmptyGroup $True
In this example, the Invoke-startDirectToGroupAssignmentMigration cmdlet is used to trigger the direct assignment to group policy assignment migration for the instance document with policy type TeamsCallingPolicy and name Test-Gpa-Adoption-Policy-2 to the group cde9a331-5bf8-415c-990c-19838b0d898c. In this case the flag allowNonEmptyGroup is provided which means even thought the group provided already have an active group policy assignment the operation will be trigger.
Parameters
-AllowNonEmptyGroup
Flag to know if the process should continue or not when the group provided already have an active group policy assignment.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Authority
The authority (issuer) of the policy.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-GroupId
The target group ID.
Parameter properties
| Type: | Guid |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PolicyName
The name of the policy.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PolicyType
The type of the policy.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.