Remove-CsAnalogDevice
Topic Last Modified: 2012-03-27
Removes an existing device from the collection of analog devices that can be managed by using Microsoft Lync Server 2010. An analog device is a telephone or other device that is connected to the public switched telephone network (PSTN).
Syntax
Remove-CsAnalogDevice [-Identity] <UserIdParameter> [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Detailed Description
Analog devices include telephones, fax machines, modems, and teletype/telecommunication device for the deaf (TTY/TDD) devices connected to the public switched telephone network (PSTN). Unlike devices that take advantage of Enterprise Voice (the Voice over Internet Protocol (VoIP) solution offered by Microsoft), analog devices do not transmit information by using digital packets. Instead, information is transmitted by using a continuous signal. This signal is commonly referred to as an analog signal; hence the term "analog devices."
In order to enable administrators to manage analog devices for organizations, Lync Server 2010 lets you associate analog devices with Active Directory contact objects. After a device has been associated with a contact object, you can then manage the analog device by assigning policies and dial plans to the contact.
Over time, you might need to delete a contact object associated with an analog device. For example, if you phase out all of your fax machines, you will no longer need to have analog devices (and contact objects) associated with those machines. The Remove-CsAnalogDevice cmdlet provides a way for you to delete analog devices. When you run this cmdlet, the device will be deleted from the list of analog devices returned by Get-CsAnalogDevice. Additionally, the contact object associated with that device will be deleted from Active Directory Domain Services (AD DS).
Who can run this cmdlet: By default, members of the following groups are authorized to run the Remove-CsAnalogDevice cmdlet locally: RTCUniversalUserAdmins. Permissions to run this cmdlet for specific sites or specific Active Directory organizational units (OUs) can be assigned by using the Grant-CsOUPermission cmdlet. 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-CsAnalogDevice"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
Active Directory distinguished name |
Unique identifier for the analog device to be removed. Analog devices are identified by using the Active Directory distinguished name (DN) of the associated contact object. By default, these devices, use a globally unique identifier (GUID) as their common name; that means analog devices will typically have an Identity similar to this: CN={ce84964a-c4da-4622-ad34-c54ff3ed361f},OU=Redmond,DC=Litwareinc,DC=com. Because of that you might find it easier to retrieve analog devices by using the Get-CsAnalogDevice cmdlet, and then piping the returned objects to Remove-CsAnalogDevice. |
WhatIf |
Optional |
Switch Parameter |
Describes what would happen if you executed the command without actually executing the command. |
Confirm |
Optional |
Switch Parameter |
Prompts you for confirmation before executing the command. |
Input Types
Microsoft.Rtc.Management.ADConnect.Schema.OCSADAnalogDeviceContact object. Remove-CsAnalogDevice accepts pipelined instances of the analog device object.
Return Types
Remove-CsAnalogDevice deletes existing instances of the Microsoft.Rtc.Management.ADConnect.Schema.OCSADAnalogDeviceContact object.
Example
-------------------------- Example 1 ------------------------
Remove-CsAnalogDevice -Identity "CN={e5e7daba-394e-46ec-95a1-1f2a9947aad2},CN=Users,DC=litwareinc,DC=com"
Example 1 deletes the analog device that has the Identity CN={e5e7daba-394e-46ec-95a1-1f2a9947aad2},CN=Users,DC=litwareinc,DC=com.
-------------------------- Example 2 ------------------------
Get-CsAnalogDevice -Filter {DisplayName -eq "Building 14 Receptionist"} | Remove-CsAnalogDevice
The command shown in Example 2 deletes any analog devices that have been assigned the display name "Building 14 Receptionist". To carry out this task, the command first calls Get-CsAnalogDevice along with the Filter parameter; the filter value {DisplayName -eq "Building 14 Receptionist"} limits the returned objects to analog devices where the DisplayName property is equal to "Building 14 Receptionist". The returned items are then piped to, and removed by, Remove-CsAnalogDevice.
-------------------------- Example 3 ------------------------
Get-CsAnalogDevice -Filter {VoicePolicy -eq "RedmondVoicePolicy"} | Remove-CsAnalogDevice
The preceding command deletes all of the analog devices that have been assigned the voice policy RedmondVoicePolicy. To do this, Get-CsAnalogDevice and the Filter parameter are used to retrieve all of the analog devices where the VoicePolicy property is equal to RedmondVoicePolicy. The filtered collection is then piped to the Remove-CsAnalogDevice cmdlet, which deletes each item in that collection.
-------------------------- Example 4 ------------------------
Get-CsAnalogDevice -Filter {AnalogFax -eq $True} | Remove-CsAnalogDevice
The command shown in Example 4 removes all the analog fax machines currently in use in the organization. To carry out this task, Get-CsAnalogDevice is called first along with the Filter parameter; the filter value {AnalogFax –eq $True} picks out only those devices where the AnalogFax property is equal to True. In turn, this filtered collection is piped to Remove-CsAnalogDevice, which removes each item in the collection.
See Also
Other Resources
Get-CsAnalogDevice
Move-CsAnalogDevice
New-CsAnalogDevice
Set-CsAnalogDevice