Forum Discussion
The term 'Get-MessageTraceV2' is not recognized as a name of a cmdlet
I am writing a function app to get message delivery status.
I have the package defined in requirements.psd1 as such:
# This file enables modules to be automatically managed by the Functions service. # See https://aka.ms/functionsmanageddependency for additional information. # @{ # For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'. Uncomment the next line and replace the MAJOR_VERSION, e.g., 'Az' = '5.*' # 'Az' = 'MAJOR_VERSION.*' 'ExchangeOnlineManagement' = '3.*' }
This is the error we get:
The term Get-MessageTraceV2 is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct, and try again.
The bizarre thing is that it sometimes works and sometimes doesn't without any changes to the code.
Even when several of my colleagues and I try the command locally, we have the same error.
1 Reply
- froggothegoodCopper Contributor
Extra Information:
I am using managed Identity to connect to exchange.
I have added Exchange.ManageAsApp permission.
I have tried: exchange admin, global reader, Tracking-View-Only (exchange role).
All the same.