Hi ,
Do you mean you need to connect to Exchange Online PowerShell with modern authentication?
If so, you could refer to this link to run ”Connect-ExchangeOnline” command to connect .
In addition ,please make sure Windows PowerShell has EXO V2 module installed .
About the Exchange Online PowerShell V2 module | Microsoft Learn
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.