Script för att ta bort gamla moverequests

Script to remove old moverequests
Error 1121
The Microsoft Exchange Mailbox Replication service was unable to process a request due to an unexpected error.
Request GUID: ‘7ff5aee6-4459-4d75-b1a7-8effa424add9’
Database GUID: ‘0acdce99-aab5-4c88-99a6-25e68995e9c6′
Error: Database ’15f21f3e-dbb8-405f-a1ec-c4b50dc87da9’ doesn’t exist..
# USE Below to get a CSV file
# Get-MoveRequestStatistics -MoveRequestQueue 0acdce99-aab5-4c88-99a6-25e68995e9c6 | select Displayname, exchangeguid, requestguid | Export-Csv move-req.csv -encoding utf8 -notypeinformation
param ([string] $CSVPath)

# Add Requestqueuename This id the Database GUID from the errormessage.
$RequestQueue = “0acdce99-aab5-4c88-99a6-25e68995e9c6”

$Moverequests = $CSVUsers= (Import-CSV -delimiter “,” $CSVPath)

Foreach ($Moverequest in $Moverequests)
remove-moverequest -moverequestqueue $RequestQueue -mailboxguid $Moverequest.ExchangeGuid