|
| 1 | +--- |
| 2 | +external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml |
| 3 | +Module Name: MicrosoftTeams |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +author: tomkau |
| 7 | +ms.author: tomkau |
| 8 | +ms.reviewer: |
| 9 | +--- |
| 10 | + |
| 11 | +# Get-CsBatchPolicyAssignmentOperation |
| 12 | + |
| 13 | +## SYNOPSIS |
| 14 | +This cmdlet is used to assign retrieve the status of batch policy assignment operations. |
| 15 | + |
| 16 | +Note: Status for batch policy assignment operations are retained for 30 days. |
| 17 | + |
| 18 | +## SYNTAX |
| 19 | + |
| 20 | +``` |
| 21 | +Get-CsBatchPolicyAssignmentOperation [-OperationId <UniqueIdentifier>] |
| 22 | +``` |
| 23 | + |
| 24 | +## DESCRIPTION |
| 25 | +This cmdlets returns the status of all batch policy assignment operations for the last 30 days. If an operation ID is specified, the detailed status for that operation is returned including the status for each user in the batch. |
| 26 | + |
| 27 | +## EXAMPLES |
| 28 | + |
| 29 | +### Example 1 |
| 30 | +In this example, the status of all batch assignment operations is returned. |
| 31 | + |
| 32 | +``` |
| 33 | +Get-CsBatchPolicyAssignmentOperation | ft OperationId, CreatedTime, CompletedTime, CompletedCount, ErrorCount |
| 34 | +
|
| 35 | +OperationId CreatedTime CompletedTime CompletedCount ErrorCount |
| 36 | +----------- ----------- ------------- -------------- ---------- |
| 37 | +e640a5c9-c74f-4df7-b62e-4b01ae878bdc 7/19/2019 5:21:07 AM 7/19/2019 5:21:15 AM 8 0 |
| 38 | +01b9b2b7-5dbb-487c-b4ea-887c7c66559c 7/30/2019 7:55:16 PM 7/30/2019 7:55:21 PM 8 0 |
| 39 | +47bbc636-365d-4441-af34-9e0eceb05ef1 7/30/2019 8:14:22 PM 7/30/2019 8:14:33 PM 8 0 |
| 40 | +3964004e-caa8-4eb4-b0d2-7dd2c8173c8c 7/30/2019 8:17:37 PM 7/30/2019 8:17:49 PM 8 0 |
| 41 | +e70ef814-3289-4ee8-9402-5ec7ce1dde49 8/19/2019 8:16:25 PM 8/19/2019 8:16:34 PM 8 0 |
| 42 | +001141c3-1daa-4da1-88e9-66cc01c511e1 8/19/2019 8:17:41 PM 8/19/2019 8:17:51 PM 8 1 |
| 43 | +fd269d30-ae75-45b2-ad10-ec678940ef81 8/21/2019 11:28:01 PM 8/21/2019 11:28:07 PM 8 0 |
| 44 | +7040dcc2-30fa-4d19-a280-09e824c8b7aa 8/21/2019 11:37:00 PM 8/21/2019 11:37:12 PM 8 0 |
| 45 | +``` |
| 46 | + |
| 47 | +### Example 2 |
| 48 | +In this example, the status of a single batch is returned, including the assignment status for each user. In this example, one of the users was not found. |
| 49 | + |
| 50 | +``` |
| 51 | +Get-CsBatchPolicyAssignmentOperation -OperationId 001141c3-1daa-4da1-88e9-66cc01c511e1 | Select -ExpandProperty UserState |
| 52 | +
|
| 53 | +Id Result State |
| 54 | +-- ------ ----- |
| 55 | +user01@fabrikam.com Success Completed |
| 56 | +user02@fabrikam.com Success Completed |
| 57 | +user03@fabrikam.com Success Completed |
| 58 | +user04@fabrikam.com Success Completed |
| 59 | +user05@fabkam.com Error: User not found. Completed |
| 60 | +user06@fabrikam.com Success Completed |
| 61 | +user07@fabrikam.com Success Completed |
| 62 | +user08@fabrikam.com Success Completed |
| 63 | +``` |
| 64 | + |
| 65 | +## PARAMETERS |
| 66 | + |
| 67 | +### -OperationId |
| 68 | +The ID of a batch policy assignment operation. |
| 69 | + |
| 70 | +```yaml |
| 71 | +Type: String |
| 72 | +Parameter Sets: |
| 73 | +Aliases: |
| 74 | + |
| 75 | +Required: False |
| 76 | +Position: Named |
| 77 | +Default value: None |
| 78 | +Accept pipeline input: False |
| 79 | +Accept wildcard characters: False |
| 80 | +``` |
| 81 | +### CommonParameters |
| 82 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. |
| 83 | +For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). |
| 84 | +
|
| 85 | +## INPUTS |
| 86 | +
|
| 87 | +## OUTPUTS |
| 88 | +
|
| 89 | +### OperationId |
| 90 | +The ID of the operation that can be used with the Get-CsBatchPolicyAssignmentOperation cmdlet to get the status of the operation. |
| 91 | +
|
| 92 | +### CompletedCount |
| 93 | +The number of users in the batch for which the assignment has been completed (possibly with an error). |
| 94 | +
|
| 95 | +### CompletedTime |
| 96 | +The date and time when the operation was completed. |
| 97 | +
|
| 98 | +### CreatedTime |
| 99 | +The date and time when the operation was created. |
| 100 | +
|
| 101 | +### ErrorCount |
| 102 | +The number of users in the batch for which the assignment failed. |
| 103 | +
|
| 104 | +### InProgressCount |
| 105 | +The number of users in the batch for which the assignment is in progress. |
| 106 | +
|
| 107 | +### NotStartedCount |
| 108 | +The number of users in the batch for which the assignment has not yet been performed. |
| 109 | +
|
| 110 | +### OperationId |
| 111 | +The ID of the operation. |
| 112 | +
|
| 113 | +### OperationName |
| 114 | +The name of the operation, if one was specific when the operation was created. |
| 115 | +
|
| 116 | +### OverallStatus |
| 117 | +The overall status of the operations: NotStarted, InProgress, Complete |
| 118 | +
|
| 119 | +### UserState |
| 120 | +Contains the status for each user in the batch. |
| 121 | +
|
| 122 | +**Id:** The ID of the user as specified when the batch was submitted. Either the user object ID (guid) or UPN/SIP/email. |
| 123 | +
|
| 124 | +**result:** The result of the assignment operation for the user: Success or an error. |
| 125 | +
|
| 126 | +**state:** The status for the user: NotStarted, InProgress, Completed |
| 127 | +
|
| 128 | +## NOTES |
| 129 | +
|
| 130 | +## RELATED LINKS |
| 131 | +
|
| 132 | +[New-CsBatchPolicyAssignmentOperation]() |
0 commit comments