Edit

Share via


Remove-CsUnassignedNumber

Removes an existing range of unassigned numbers and the routing rules that apply to those numbers. This cmdlet was introduced in Lync Server 2010.

Syntax

Default (Default)

Remove-CsUnassignedNumber
    [-Identity] <XdsGlobalRelativeIdentity>
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Unassigned numbers are phone numbers that have been assigned to an organization but that have not been assigned to specific users or phones. Skype for Business Server can be set up to route calls to appropriate destinations when an unassigned number is called. This cmdlet removes the settings that define that routing.

Examples

Example 1

Remove-CsUnassignedNumber -Identity UNSet1

In this example, the unassigned number settings with the Identity UNSet1 are removed.

Example 2

Get-CsUnassignedNumber | Where-Object {$_.AnnouncementName -match "Welcome"} | Remove-CsUnassignedNumber

Example 2 removes all unassigned number settings where the name of the assigned announcement contains the string Welcome. The command begins with a call to the Get-CsUnassignedNumber cmdlet, which returns a collection of all unassigned number settings. This collection is then passed to the Where-Object cmdlet, which narrows down the collection to only those unassigned number settings with an AnnouncementName that includes (-match) the string Welcome. Finally, the narrowed-down collection is passed to the Remove-CsUnassignedNumber cmdlet, which removes everything left in the collection.

Parameters

-Confirm

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Prompts you for confirmation before executing the command.

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

-Force

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

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: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

The unique name for the range of unassigned numbers you want to remove.

Parameter properties

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

Parameter sets

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

-WhatIf

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Describes what would happen if you executed the command without actually executing the command.

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.

Inputs

Microsoft.Rtc.Management.Voice.Helpers.DisplayAnnouncementVacantNumberRange

Accepts pipelined input of unassigned number objects.

Outputs

None

This cmdlet does not return a value. It removes an object of type Microsoft.Rtc.Management.Voice.Helpers.DisplayAnnouncementVacantNumberRange.