1
votes

My search-mailbox command not work. the issue is like:

[PS] C:\Windows\system32>Search-Mailbox -Identity "abc" -SearchQuery "Subject:'test'" Target mailbox or .pst file path is required. + CategoryInfo : InvalidArgument: (:) [], ArgumentException + FullyQualifiedErrorId : 78AF2AE3

At the same time, the command like get-mailbox has no problem.

Doese anybody can help?

1

1 Answers

2
votes

The problem fixed by set target mailbox and folder. Use command like folloing:

Search-Mailbox -Identity "abc" -SearchQuery "Subject:'test mail'" -TargetMailbox "demo.xw" -TargetFolder "SearchLog"