We have Exchange 2010 servers. We also have a server that we have a bunch of scripts running on scheduled tasks. After upgrading the Exchange servers to SP2 Rollup 5 v2, and then upgrading the server with the scripts to the same version, our scripts have started failing.
One simple example is the get-mailboxfolderstatistics cmdlet. It runs just fine on the Exchange server without error, but when the command is run on the server with the scripts, it results in the following error:
PS C:\psscripts> get-mailboxfolderstatistics jsmith WARNING: An unexpected error has occurred and a Watson dump is being generated: Operation is not valid due to the current state of the object. Get-MailboxFolderStatistics : Operation is not valid due to the current state of the object. At line:1 char:28+ get-mailboxfolderstatistics <<<< jsmith+ CategoryInfo : NotSpecified: (:) [Get-MailboxFolderStatistics], InvalidOperationException+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.Tasks.GetMailboxFolderStatistics
Any ideas? Really need to get these scripts running again.
TIA
Jim
Jim