I am trying to remove all messages with a specific subject from all mailboxes in a specific database that is at a different location. I know that I am along the right track but I just cannot get the syntax correct.
Get-Mailbox -"servername\Mailbox Database" -DomainController dc server name -ResultSize "Unlimited" | Export-Mailbox -TargetMailbox mailbox name -TargetFolder folder name -SubjectKeyWords"keywords"
It keeps coming back with an error: Get-Mailbox : The operation could not be performed because object '-servername\MailboxDatabase' could not be found on domain controller 'FQN Servername'. Obviously I have tried many variations to what I have above.
Any ideas?
Matt McGlone