So, I have several mail migration batches for one of my clients that I am clearing out. I can do this one at a time by using the remove-migrationbatch command in PowerShell, but, I want to try and script this so that I can run a get-migrationbatch and pipe the output of that to the remove-migrationbatch command (so I can just run that command and clean up all of the completed batches). I am thinking something like this:
Get-MigrationBatch -Status "Completed" | remove-migrationbatch -force -confirm:$false
If I run this, I get cannot processs argument transformation on parameter Identity.
I can get around in PowerShell OK and have some good scripts already, but, I am by no means an expert and still have a lot to learn. Can anyone point me in the right direction?<o:p></o:p>