Remove-CsLisLocation
Topic Last Modified: 2012-03-27
Removes a location from the location configuration database for Enhanced 9-1-1 (E9-1-1).
Syntax
Remove-CsLisLocation -City <String> -CompanyName <String> -Country <String> -HouseNumber <String> -HouseNumberSuffix <String> -Location <String> -PostalCode <String> -PostDirectional <String> -PreDirectional <String> -State <String> -StreetName <String> -StreetSuffix <String> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
Remove-CsLisLocation [-City <String>] [-CompanyName <String>] [-Confirm [<SwitchParameter>]] [-Country <String>] [-HouseNumber <String>] [-HouseNumberSuffix <String>] [-Location <String>] [-PostalCode <String>] [-PostDirectional <String>] [-PreDirectional <String>] [-State <String>] [-StreetName <String>] [-StreetSuffix <String>] [-WhatIf [<SwitchParameter>]]
Detailed Description
E9-1-1 enables those who answer emergency calls to determine the caller’s geographic location without having to ask the caller for that information. In Microsoft Lync Server 2010 the location is determined based on mapping the caller’s port, subnet, switch, or wireless access point to a specific location. This cmdlet removes a location from the location configuration database. All properties of a location combined make the location unique, so you must enter all non-null properties of the location to remove it. If you do not enter all non-null properties of the location you want to remove (and no other location contains only the properties you specified), no locations will be removed. You won’t receive an error in this case, but no action will occur.
This cmdlet will not remove locations that are associated with a Location Information Server (LIS) port, subnet, switch, or wireless access point. If you attempt to remove a location referenced by any of these devices, you’ll receive an error. You must remove all references before removing the location. You can use the Remove-CsLisPort, Remove-CsLisSubnet, Remove-CsLisSwitch, and Remove-CsLisWirelessAccessPoint cmdlets to remove these references.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Remove-CsLisLocation 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-CsLisLocation"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
City |
Required |
String |
The location city. |
CompanyName |
Required |
String |
The name of the company at this location. |
Country |
Required |
String |
The country/region this location is in. This value will contain two characters or less. |
HouseNumber |
Required |
String |
The house number of the location. For a company this is the number on the street where the company is located. |
HouseNumberSuffix |
Required |
String |
Additional information for the house number, such as 1/2 or A. For example, 1234 1/2 Oak Street or 1234 A Elm Street. |
Location |
Required |
String |
The name for this location. |
PostalCode |
Required |
String |
The postal code associated with this location. |
PostDirectional |
Required |
String |
The directional designation of a street name. For example, NE or NW for Main Street NE or 7th Avenue NW. |
PreDirectional |
Required |
String |
The directional designation for a street name that precedes the name of the street. For example, NE or NW for NE Main Street or NW 7th Avenue. |
State |
Required |
String |
The state or province associated with this location. This value will be two characters or less. |
StreetName |
Required |
String |
The name of the street for this location. |
StreetSuffix |
Required |
String |
The type of street designated in a street name, such as Street, Avenue, or Court. |
WhatIf |
Optional |
SwitchParameter |
Describes what would happen if you executed the command without actually executing the command. |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before executing the command. |
Input Types
Accepts pipelined input of LIS location objects.
Return Types
This cmdlet does not return a value or object. It removes an object of type System.Management.Automation.PSCustomObject.
Example
-------------------------- Example 1 --------------------------
Remove-CsLisLocation -Location Bldg30NEWing -HouseNumber 1000 -StreetName Main -City Redmond -State WA -Country US
Example 1 removes a location named Bldg30NEWing. This command specifies values for the parameters Location, HouseNumber, StreetName, City, State, and Country. This means that those are the only properties of the location to be deleted that contain non-null values. If you don’t supply parameter values for all non-null properties, the location will not be deleted. You will be prompted for any parameter that you haven’t specified in the command, but if they contain null values you can simply press Enter at each prompt.
-------------------------- Example 2 --------------------------
Get-CsLisLocation -Unreferenced | Remove-CsLisLocation
This example will remove all locations that are not referenced by a LIS port, subnet, switch, or wireless access point. The command begins with a call to Get-CsLisLocation, specifying the Unreferenced parameter. This will return a collection of all locations that are not referenced by a LIS port, subnet, switch, or wireless access point. This collection is then piped to Remove-CsLisLocation, which removes each location in the collection.