This is the cmd I am running to delete messages from a specific mail database :
Get-Mailbox -Database "private information store" | Export-Mailbox -ExcludeFolders "\Calendar" -EndDate 1/12/2015 -DeleteContent
However, when I run the cmd it just goes back to the prompt.
Heres the log entry:
[4/13/2015 9:33:56 AM] [0] Executing Command: 'Get-Mailbox -Database "private information store" | Export-Mailbox -ExcludeFolders "\Calendar" -EndDate 1/12/2015 -DeleteContent'
[4/13/2015 9:33:57 AM] [0] Administrator Active Directory session settings are:
View Entire Forest: 'False', Default Scope: 'domain1.com', Configuration Domain Controller: 'DC.domain2.com',
[4/13/2015 9:33:57 AM] [0] Searching objects "mail.domain1.com\private information store" of type "MailboxDatabase" under the root "$null".
[4/13/2015 9:33:58 AM] [0] Previous operation run on domain controller 'DC.domain2.com'.
[4/13/2015 9:33:58 AM] [0] Searching objects of type "ADUser" with filter "(&((RecipientType Equal UserMailbox)(Database Equal mail\SG1\Private Information Store)))", scope "SubTree" under the
root "$null".
[4/13/2015 9:33:58 AM] [0] Previous operation run on domain controller 'dc.domain1.com'.
[4/13/2015 9:33:58 AM] [0] Preparing to output objects. Maximum result set size "1000".
[4/13/2015 9:33:58 AM] [0] Ending processing.
[4/13/2015 9:33:58 AM] [0] Ending processing.
The mail server is in a separate domain from where the user accounts reside. I am trying to run this from the mail server. The account I am logged in with has full rights on all mailboxes.