New-MoveRequest -WhatIf paramter

I would like to know how to find the results of the -WhatIf parameter on the New-MoveRequest.

If I execute the command New-MoveRequest -identity "User" -TargetDatabase "NewDB" the move request eventually fails, because of a corrupt message.  So I know there is an error, but I do I find these errors when I run it with the -WhatIf parameter?
LVL 2
byt3Asked:
Who is Participating?
 
Neil RussellConnect With a Mentor Technical Development LeadCommented:
The corrupt messages will ONLY be found when the command executes. -whatif does not execute the command therefore can NOT show you the bad messages.

Best option is to either trawl through the logs after it fails and identify failed messages

OR

Specify something like   -BadItemLimit 100 -AcceptLargeDataLoss  and accept the loss of some individual emails.
0
 
Neil RussellTechnical Development LeadCommented:
The whatif wont help you in the slightest.

You need to examine the logs created by the move command OR specify that you want to ignore all errors.
0
 
Neil RussellTechnical Development LeadCommented:
The -whatif  parameter of ALL powershell cmdlets just shows you what would be executed, it does NOT execute the actual command.
0
 
byt3Author Commented:
I know it won't execute the command.  I just want it to pretend to execute the command, so I can find out what the error(s) will be and fix it before executing the actual command.

Basically I want to find out what all the corrupt messages are in a mailbox and fix ahead of time.

Thanks.
0
 
byt3Author Commented:
That's lame.  That means -WhatIf doesn't really do anything useful if anything at all.

I need to check to make sure it is a message that I can skip (not important some how).  As is, I have to run the command and have it fail, check the message and repeat for who knows how many messages.

Would be nice to get a list of corrupt messages somehow so I can check through all messages at once then continue.

Thanks anyway.
0
All Courses

From novice to tech pro — start learning today.