Start-HistoricalSearch : Invalid Organization value

Today I got the following “Invalid Organization value” error when trying to run Start-HistoricalSearch and Get-HistoricalSearch in Office 365.

Start-HistoricalSearch -ReportType MessageTrace -ReportTitle “02-2019” -NotifyAddress admin@itexperience.net -StartDate 02/01/2019 -EndDate 03/01/2019 -RecipientAddress admin@itexperience.net
start-HistoricalSearch : Invalid Organization value.
At line:1 char:1

It appears this error occurs when I first load Microsoft.Exchange.Management.PowerShell.E2010 with cmdlet:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

and afterwards try to connect to MSOL:

Connect-MsolService

The Add-PSSnapin was a mistake, so it was easy for me to fix. But if you encounter this same error and you need both PSSnapin and Module, try to swap them.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x