Edit

Share via


Set-CsOnlineVoiceUser

Use the Set-CsOnlineVoiceUser cmdlet to set the PSTN specific parameters (like telephone numbers and emergency response locations.)

Syntax

Default (Default)

Set-CsOnlineVoiceUser
    [-Identity] <UserIdParameter>
    [-Tenant <Guid>]
    [-TelephoneNumber <String>]
    [-LocationID <Guid>]
    [-DomainController <Fqdn>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Note: This cmdlet has been deprecated. Use the new Set-CsPhoneNumberAssignment and Remove-CsPhoneNumberAssignment cmdlets instead.

Examples

Example 1

Set-CsOnlineVoiceUser -Identity 3c37e1c7-78f9-4703-82ee-a6b68516794e -TelephoneNumber +14255037311 -LocationID c7c5a17f-00d7-47c0-9ddb-3383229d606b

This example sets the telephone number and location for a user identified by the user ObjectID.

Example 2

Set-CsOnlineVoiceUser -Identity user@domain.com -TelephoneNumber $null

This example removes the telephone number for a user identified by the user's SIP address.

Parameters

-Confirm

Applicable: Microsoft Teams

The Confirm switch causes the command to pause processing and requires confirmation to proceed.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainController

Applicable: Microsoft Teams

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:Fqdn
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DC

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Microsoft Teams

The Force switch specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If the Force switch isn't provided in the command, you're prompted for administrative input if required.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Microsoft Teams

Specifies the identity of the target user. Acceptable values include:

Example: jphillips@contoso.com

Example: sip:jphillips@contoso.com

Example: 98403f08-577c-46dd-851a-f0460a13b03d

You can use the Get-CsOnlineUser cmdlet to identify the users you want to modify.

Parameter properties

Type:Object
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LocationID

Applicable: Microsoft Teams

Specifies the unique identifier of the emergency location to assign to the user. Location identities can be discovered by using the Get-CsOnlineLisLocation cmdlet.

This parameter is required for users based in the US.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TelephoneNumber

Applicable: Microsoft Teams

Specifies the telephone number to be assigned to the user. The value must be in E.164 format: +14255043920. Setting the value to $Null clears the user's telephone number.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tenant

Applicable: Microsoft Teams

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Microsoft Teams

The WhatIf parameter is not implemented for this cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.