Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

TargetFolder not available with New-MailboxSearch? Need powershell help

$
0
0

In an effort to remove some garbage such as MSNBC RSS Feeds, I've constructed a crude powershell command: 

Get-Mailbox -Identity "user" | Search-Mailbox -SearchQuery "subject:'a OR the OR of'" -TargetFolder "MSNBC News" -TargetMailbox "superuser" -DeleteContent

Two problems, first that I don't need to limit the deletion to items with a certain subject line, but the command seems to fail without something plugged in there. I just want to remove everything in that folder. 

Second problem, Search-Mailbox only deletes the first 10000 items it finds, posting a warning that I should be using New-MailboxSearch. But New-MailboxSearch doesn't support the TargetFolder parameter which allows me to target and empty the particular folder which needs to be emptied. 

If possible, could a powershell wizard help by providing an example of how to delete content from an RSS feeds folder with a particular name which might contain over 100,000 items. 

Thanks

Bill


Bill Coulter


Viewing all articles
Browse latest Browse all 8719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>