Solved

New-MoveRequest -WhatIf paramter

Posted on 2013-01-23
5
1,532 Views
Last Modified: 2013-01-23
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?
0
Comment
Question by:byt3
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 38811637
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
 
LVL 37

Expert Comment

by:Neil Russell
ID: 38811658
The -whatif  parameter of ALL powershell cmdlets just shows you what would be executed, it does NOT execute the actual command.
0
 
LVL 2

Author Comment

by:byt3
ID: 38811673
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
 
LVL 37

Accepted Solution

by:
Neil Russell earned 250 total points
ID: 38811690
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
 
LVL 2

Author Comment

by:byt3
ID: 38812117
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are trying to access the server, have you ever encountered "The terminal server has exceeded the maximum number of allowed connection" error?  or "The user is attempting to log on to a Terminal Server in Remote Administration mode, but the …
Hi Everyone Now IIS AppPool issues is something we have always had because of the amazing custom development and in-house applications we have :) The issues we had were getting out of control and it was time to do something about it, just for…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question