Get-MessageTrace cmdlet not available in Powershell

Hello All,

I am new to Powershell and I have many questions, however for now just one :slight_smile:

After experiencing a long wait for O365 to return info for a message trace, I read that PS can perform the same task exceptionally quickly.

I have installed the AzureAd module, Installed MSOnline module and connected to AzureAD from PS.

I can run cmdlets, however the Get-MessageTrace cmdlet does not seem to exist.

This is what returns;

PS C:\Users\Jim.Beam> Get-MessageTrace
Get-MessageTrace : The term ‘Get-MessageTrace’ is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1

  • Get-MessageTrace
  • CategoryInfo : ObjectNotFound: (Get-MessageTrace:String) , CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException

A noob question for you guru’s out there, however any help is appreciated!

Thank you!

Sozo.

Id would have been polite and less unfair if you at least tell that you asked this question in other forums as well and placed a link so that people willing to help you do not have to do it more than once.

I’d recommend to use the Microsoft Exchange Online Powershell Module and the included cmdlet Connect-EXOPSSession to connect to Exchange Online. There you will find the desired cmdlet.

Sorry Olaf, I take it that I have committed a faux pas.

Many forums do not allow linking, and I did not realize that it was proper etiquette to mention that I have posted in other forums.

Thank you for your excellent advice. I will keep it in mind for the future.

Best regards,

Sozo

Update;

I had not imported the online exchange session, now that I have it works great!

Thank you for the suggestion!

Sozo