Skip to content

Commit 39746d3

Browse files
authored
Update Remove-PublicFolderMailboxMigrationRequest.md
1 parent 2b12b4e commit 39746d3

File tree

1 file changed

+10
-33
lines changed

1 file changed

+10
-33
lines changed

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

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -48,44 +48,21 @@ Remove-PublicFolderMailboxMigrationRequest -Identity \PublicFolderMailboxMigrati
4848

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

51-
### ------------Example 2: Removing an orphaned public folder mailbox migration request -----------
51+
### -------------------------- Example 2 --------------------------
52+
```
53+
Get-PublicFolderMailboxMigrationRequest | ?{$_.TargetMailbox -eq $null}
5254
```
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-
### -------Example 3: 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:
8255

83-
`Get-PublicFolderMailboxMigrationRequest | group TargetMailbox |?{$_.Count -gt 1}`
56+
This example returns public folder mailbox migration requests that don't have a target mailbox. To remove these orphaned migration requests, add " | Remove-PublicFolderMailboxMigrationRequest" to the end of the command.
8457

85-
If you do not get any output from the above command, then you do not have any duplicate mailbox migration requests.
58+
### -------------------------- Example 3 --------------------------
59+
```
60+
Get-PublicFolderMailboxMigrationRequest | group TargetMailbox |?{$_.Count -gt 1}
61+
```
8662

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.
63+
This example returns duplicate public folder migration requests (requests created for the same target mailbox). If the command returns no results, then there are no duplicate migration requests.
8864

65+
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.
8966

9067
## PARAMETERS
9168

0 commit comments

Comments
 (0)