Logging in to Connect-ExchangeOnline and getting current Tenant name

Evan Kent 6 Reputation points
2022-07-03T14:51:56.023+00:00

When I connect using Connect-ExchangeOnline does anyone know how i can pull the tenant name? I know if i use Connect-AzureAD I can pull it by by running Get-AzureADTenantDetail | FL DisplayName | Out-String.

Or in the alternative, if I use Connect-ExchangeOnline and the window pop's up to login, does anyone know how I can also get it to login in to Connect AzureAD at the same time and not require logging in a 2nd time ?

My Client has MFA turned on, so typing in the credentials and storing them doesn't appear to work.

Thank you

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
560 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 157.8K Reputation points MVP Volunteer Moderator
    2022-07-03T15:08:07.097+00:00

    one method with ExO PS:

    Get-OrganizationConfig |FL OrganizationalUnitRoot  
    

  2. Evan Kent 6 Reputation points
    2022-07-04T12:25:22.307+00:00

    This worked though! I can user Get-OrganizationConfig |FL Displayname

    Thank you so much!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.