New-ComplianceSearch BUG – ExchangeLocation gets cleared.

Just creating some script for GDPR email removal mechanism, and noticed one interesting thing – already reported this bug to MS.

Last time when I got issue about Compliance Searches it was that when telling it to “purge” the messages it was not really purging the messages – I flagged that you need to use Search-Maibox to actually do it – case was submitted to MS and they changed the documentation.

There is something more – when creating a compliance search and assigning it to the case I noticed that when triggering a command the ExchangeLocation was…empty. It wouldn’t be weird but I explicitly told  I want to have “all” there.

After experimenting a while,  noticed that this works:

New-ComplianceSearch -Name "ISUPER-124321" -ExchangeLocation "all" -ContentMatchQuery "test123 OR 123qwe" -Case "ISUPER-124321"| Start-ComplianceSearch

New-ComplianceSearch -Name "CASE ISUPER-124321" -ExchangeLocation "all" -ContentMatchQuery "test123 OR 123qwe" | Start-ComplianceSearch

BUT this does not:

New-ComplianceSearch -Name "CASE ISUPER-124321" -ExchangeLocation "all" -ContentMatchQuery "test123 OR 123qwe" -Case "ISUPER-124321"| Start-ComplianceSearch

And if you check the compliance search properties, ExchangeLocation will be…EMPTY.

excsuseme

Apparently the problem is the “space” in the name of the search, but ONLY when search is assigned to a case, name however can contain a space when we do not assign a search to a case.

I ended up not assigning searches to any case.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s