Forum Discussion
jstump1972
Jul 10, 2020Copper Contributor
Deleting malicious emails from all O365 mailboxes
Please assist me with a exch ps o365 script to remove email from all o365 mailboxes by subject line or sender email address. I cannot seem to find the right command to do in cloud.
jstump1972
Jul 10, 2020Copper Contributor
i am connecting using the microsoft exchange online powershell module and i am a global admin in our tenant
stevemorgan
Jul 11, 2020Copper Contributor
Like I quoted earlier, you'll need to assign yourself the appropriate roles in Exchange Online. These aren't assigned by default to anyone; even when you're a Global Admin or part of Organizational Management in EXO. Have you assigned those roles and established a new connection to Exchange Online?
In EXO ECP you can navigate to Permissions > admin roles > click the + to add a new role:
Give it name/description
Add the two roles mentioned in the first Doc I shared
Assign members (yourself) and save.
Give it a few minutes, reestablish a powershell connection to EXO and try again.