Topic Last Modified: 2010-10-01

Removes the specified device update management test device. Test devices provide a way for administrators to test firmware updates before those updates are distributed to all the devices in an organization.


Remove-CsTestDevice -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description




Indicates the Identity of the test device to be removed. To remove a specific device, include both the scope (for example, site:Redmond) and the device name; for example: -Identity "site:Redmond/UCPhoneTest". To remove all the devices from a particular site use syntax similar to this: -Identity "site:Redmond".

Test devices can also be removed from the global scope. The global test device collection itself cannot be removed; however, the following command will delete all the devices stored in the global collection:

Remove-CsTestDevice –Identity global



Switch Parameter

Suppresses the display of any non-fatal error message that might occur when running the command.



Switch Parameter

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



Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

By identifying specific Microsoft Lync 2010 Phone Edition-compatible phones or other devices as test devices, administrators can verify and approve firmware updates before those updates are rolled out to all the relevant devices in the organization. When device update rules are imported to Microsoft Lync Server 2010, they are marked as "pending," which means that the updates corresponding to these rules will not automatically be downloaded and installed by the affected devices.

Instead, these pending rules will be downloaded and installed by any relevant test devices. That’s the idea behind test devices: new device update rules are automatically applied to test devices, giving administrators the opportunity to verify that the firmware updates work as expected. If they do, those administrators can then mark the rules as approved; approved rules are then downloaded and installed by all the relevant devices in the organization.

Test devices are hardware devices that run Lync 2010 Phone Edition. These devices are created by using the New-CsTestDevice cmdlet. Once created, the devices can later be removed by running the Remove-CsTestDevice cmdlet. Note that removing the device as a test device does not affect the actual device itself; for example, your Lync 2010 Phone Edition–compatible phone can still be used to access Lync Server 2010. The only difference is that, because the device is no longer a test device, it will no longer download device update rules that are in the pending state. Instead, the device will wait until the rules have been approved before downloading and installing them.

Remove-CsTestDevice can be used to remove individual test devices configured at either the global or site scope. You can also use the cmdlet to remove all the test devices configured for a given scope.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Remove-CsTestDevice cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Remove-CsTestDevice"}

Input Types

Microsoft.Rtc.Management.WritableConfig.Settings.DeviceUpdate.TestDevice object. Remove-CsTestDevice accepts pipelined input of the test device object.

Return Types

Remove-CsTestDevice does not return a value or object. Instead, the cmdlet deletes instances of the Microsoft.Rtc.Management.WritableConfig.Settings.DeviceUpdate.TestDevice object.


-------------------------- Example 1 ------------------------

Copy Code
Remove-CsTestDevice -Identity site:Redmond

The preceding command removes all the test devices from the Redmond site. This will remove the device collection as well as the individual test devices.

-------------------------- Example 2 ------------------------

Copy Code
Get-CsTestDevice | Remove-CsTestDevice

The command shown in Example 2 removes all the test devices configured for use in the organization; this is done by using Get-CsTestDevice to return all the test device collections, and then piping all of those items to Remove-CsTestDevice. Note that the global test device collection cannot be removed; however, this command will delete all the individual test devices configured at the global level.

-------------------------- Example 3 ------------------------

Copy Code
Get-CsTestDevice -Filter "site:" | Remove-CsTestDevice

In Example 3, all the test devices configured at the site scope are removed. To carry out this task, Get-CsTestDevice and the Filter parameter are used to return all the test devices that have an Identity that begins with the string value "site:". This filtered collection is then piped to Remove-CsTestDevice, which deletes all the items in the collection.

-------------------------- Example 4 ------------------------

Copy Code
Get-CsTestDevice | Where-Object {$_.Name -match "LG-Nortel Phone"} | Remove-CsTestDevice

The command shown in Example 4 deletes all the LG-Nortel Phone test devices. To do this, the command first calls Get-CsTestDevice to return all the test devices configured for use in the organization. That information is then piped to the Where-Object cmdlet, which uses the -match operator to return any devices that have the string value "LG-Nortel" anywhere in the Name property. Any test device meeting that criterion is then deleted by using Remove-CsTestDevice.

See Also