Powershell query for location, Enterprisevoiceenabled and TenantDialPlan

MS 426 Reputation points

Dear Team,

I am looking for a help to query via PS
all users from A specific location (example: US) and get
results of UserPrincipalName,

Could you please help with the PowerShelll script ?

Thanks in advance..


Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,164 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,184 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 37,376 Reputation points

    Hi @MS ,

    Based on your description, you can try running the script below and see if it can meet your needs:

    Get-CsOnlineUser -Filter "UsageLocation -eq 'US'" | fl UserPrincipalName,Enterprisevoiceenabled, TenantDialPlan  

    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.

0 additional answers

Sort by: Most helpful