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.

Continue reading “New-ComplianceSearch BUG – ExchangeLocation gets cleared.”

New-ComplianceSearch not visible in Exchange Online despite being in “Discovery Management”

So just today I learned new thing, I was missing New-ComplianceSearch cmdlet, I was a bit frustrated because I was in all the relevant groups:

Technet was not mentioning a WORD about one thing, I was able to use compliance cmdlets only after I connected diffrently, so if this is your connection string:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri https://ps.outlook.com/powershell/ -Credential $Credential -Authentication Basic –AllowRedirection

Change it to:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $Credential -Authentication Basic –AllowRedirection

This should do the trick.

o365kicksadminasses