Commands › Microsoft Teams

Get-CsOnlineVoiceUser

Microsoft Teams MicrosoftTeams Get-*

Retrieve a voice user's telephone number and location.

Quick start script

# Get-CsOnlineVoiceUser — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Get-CsOnlineVoiceUser | Format-List

# 3. Export for evidence / drift tracking
Get-CsOnlineVoiceUser | Export-Clixml .\CsOnlineVoiceUser-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-CsOnlineVoiceUser [-CivicAddressId <XdsCivicAddressId>] [-DomainController <Fqdn>] [-EnterpriseVoiceStatus <MultiValuedProperty>] [-ExpandLocation] [-First <Unlimited>] [-Force] [-GetFromAAD] [-GetPendingUsers] [-Identity <UserIdParameter>] [-LocationId <LocationID>] [-NumberAssigned] [-NumberNotAssigned] [-PSTNConnectivity <MultiValuedProperty>] [-SearchQuery <String>] [-Skip <Unlimited>] [-Tenant <Guid>]
 [<CommonParameters>]

Parameters (16)

ParameterTypeRequiredWhat it controls
-CivicAddressId XdsCivicAddressId Specifies the identity of the civic address that is assigned to the target users.
-DomainController Fqdn This parameter is reserved for internal Microsoft use.
-EnterpriseVoiceStatus MultiValuedProperty Possible values are: * All * Enabled * Disabled
-ExpandLocation SwitchParameter Displays the location parameter with its value.
-First Unlimited Specifies the number of users to return. The default is 100.
-Force SwitchParameter *This parameter has been deprecated from Teams PowerShell Modules 3.0 and above due to limited usage*.
-GetFromAAD SwitchParameter *This parameter has been deprecated from Teams PowerShell Modules 3.0 and above due to limited usage*.
-GetPendingUsers SwitchParameter *This parameter has been deprecated from Teams PowerShell Modules 3.0 and above due to limited usage*.
-Identity UserIdParameter Specifies the identity of the target user. Acceptable values include:
-LocationId LocationID Specifies the location identity of the location whose users will be returned. You can find location identifiers by using the `Get-CsOnlineLisLocation` cmdlet.
-NumberAssigned SwitchParameter If specified, the query will return users who have a phone number assigned.
-NumberNotAssigned SwitchParameter If specified, the query will return users who do not have a phone number assigned.
-PSTNConnectivity MultiValuedProperty Possible values are: * All * Online * OnPremises
-SearchQuery String *This parameter has been deprecated from Teams PowerShell Modules 3.0 and above due to limited usage*.
-Skip Unlimited Specifies the number of users to skip. If you used the First parameter to return the first 50 users and wanted to get another 50, you could use -Skip 50 to avoid returning the first 50 you've already reviewed. The...
-Tenant Guid *This parameter has been deprecated from Teams PowerShell Modules 3.0 and above due to limited usage*.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.