Hello Manu,
I ran the script:
Get-Mailbox -Identity
'DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}'
and got this result:
PS C:\Windows\system32> Get-Mailbox -Identity 'DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}'
Name Alias
ServerName ProhibitSendQuota
----
----- ---------- -----------------
DiscoverySearchMailbox... DiscoverySearchMa... Tn1pr11p9b013 50 GB (53,687,091,200 bytes)
I could not see the whole detail? discoverySearchMailbox...
The I ran this script again, not sure if I am doing it right:
Search-Mailbox-Identity"User1-SearchQuery'Subject:"ReviewSpam"'-TargetMailboxDiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}
-TargetFolder"SearchAndDeleteLog"-LogOnly-LogLevelFull
Then I got this result:
PS C:\Windows\system32>
Search-Mailbox -Identity "User1" -SearchQuery 'Subject:"Review"' -TargetMailbox DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852} -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full
A positional parameter cannot be found that accepts argument
'D919BA05-46A6-415f-80AD-7E09334BB852'.
+ CategoryInfo : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox
+ PSComputerName : pod51045psh.outlook.com
I believe the parameter should be different but couldn't see the rest of the information given.
Then I removed the longer long parameter and just left the DiscoverySearchMailbox and I got this result:
PS C:\Windows\system32>
Search-Mailbox -Identity "User1" -SearchQuery 'Subject:"Review"' -TargetMailbox DiscoverySearchMailbox -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full
WARNING: The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is sp
ecified. To return more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place eDisc
overy & Hold console in the Exchange Administration Center.
PS C:\Windows\system32>
Search-Mailbox -Identity "User1" -SearchQuery 'Subject:"Review"' -TargetMailbox DiscoverySearchMailbox -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full
WARNING: The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is sp
ecified. To return more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place eDisc
overy & Hold console in the Exchange Administration Center.
The operation couldn't be performed because object 'User1' couldn't be
found on 'BLUR09.PR110A001.prod.outlook.com'.
+ CategoryInfo : InvalidArgument: (0:Int32) [Search-Mailbox], ManagementObjectNotFo
undException
+ FullyQualifiedErrorId : [Server=CR09MB0828,RequestId=5sfsfs8-6239-4fdfd4-b9c9-316dfd41a
72,TimeStamp=7/25/2015 4:53:47 PM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException
] 5AF276B9,Microsoft.Exchange.Management.Tasks.SearchMailbox
+ PSComputerName : pod51045psh.outlook.com
What am I missing here? Thanks.