Skip to content

Commit c20ad23

Browse files
committed
Update Remove-PublicFolderMailboxMigrationRequest.md
1 parent 2c26968 commit c20ad23

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

exchange/exchange-ps/exchange/move-and-migration/Remove-PublicFolderMailboxMigrationRequest.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For information about the parameter sets in the Syntax section below, see Exchan
1717

1818
## SYNTAX
1919

20-
### Identit
20+
### Identity
2121
```
2222
Remove-PublicFolderMailboxMigrationRequest [-Identity] <PublicFolderMailboxMigrationRequestIdParameter>
2323
[-Confirm]
@@ -39,7 +39,7 @@ The Remove-PublicFolderMailboxMigrationRequest cmdlet is intended for troublesho
3939

4040
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet (https://technet.microsoft.com/library/mt432940.aspx).
4141

42-
## EXAMPLES
42+
## EXAMPLES and SCENARIOS
4343

4444
### -------------------------- Example 1 --------------------------
4545
```
@@ -48,6 +48,45 @@ Remove-PublicFolderMailboxMigrationRequest -Identity \PublicFolderMailboxMigrati
4848

4949
This example removes the specified public folder mailbox migration request.
5050

51+
### ------------Scenario 1: Removing an orphaned public folder mailbox migration request-----------
52+
```
53+
Here's an example of an orphaned PublicFolderMailboxMigrationRequest and how to remove it.
54+
55+
When there is no migration batch:
56+
`PS D:\tools\PSSession> Get-MigrationBatch`
57+
`PS D:\tools\PSSession>`
58+
59+
However, the following public folder mailbox migration request is present, with no target mailbox associated:
60+
`PS D:\tools\PSSession> Get-PublicFolderMailboxMigrationRequest`
61+
62+
|Name |TargetMailbox |Status |
63+
|---------|---------|---------|
64+
|PFMailboxMigration2b14b2ad-1e7e-4cb9-a7b5-16b70b443fc5| |Failed|
65+
66+
Or you can use the following command to list the public folder mailbox migration requests that do not have a designated target mailbox:
67+
68+
`Get-PublicFolderMailboxMigrationRequest | ?{$_.TargetMailbox -eq $null}`
69+
70+
For any orphaned requests that are returned, use `Remove-PublicFolderMailboxMigrationRequest`, as in the following example:
71+
72+
`Get-PublicFolderMailboxMigrationRequest | ?{$_.TargetMailbox -eq $null} | Remove-PublicFolderMailboxMigrationRequest`
73+
74+
75+
### -------Scenario 2: Remove duplicate public folder mailbox migration tasks-----------
76+
77+
If you observe two or more public folder mailbox migration requests created for the same target mailbox, this means the public folder mailbox migration request is duplicated.
78+
79+
You can find duplicates by running the `Get-PublicFolderMailboxMigrationRequest` cmdlet. If a mailbox name is mentioned as a target mailbox more than once, then it means you have duplicate requests.
80+
81+
You can also use the following cmdlet to find duplicate requests:
82+
83+
`Get-PublicFolderMailboxMigrationRequest | group TargetMailbox |?{$_.Count -gt 1}`
84+
85+
If you do not get any output from the above command, then you do not have any duplicate mailbox migration requests.
86+
87+
[A sample script is provided here](https://gallery.technet.microsoft.com/scriptcenter/Remove-Duplicate-public-055f0e5e) to detect duplicate or orphaned public folder mailbox migration requests and also remove them.
88+
89+
5190
## PARAMETERS
5291
5392
### -Identity

0 commit comments

Comments
 (0)