Test-CsLisConfiguration
Topic Last Modified: 2012-03-26
Tests the Location Information Server (LIS) configuration.
Syntax
Test-CsLisConfiguration -TargetFqdn <String> [-BssId <String>] [-ChassisId <String>] [-External <SwitchParameter>] [-Force <SwitchParameter>] [-Mac <String>] [-OutVerboseVariable <String>] [-PortId <String>] [-PortIdSubType <InterfaceAlias | InterfaceName | LocallyAssigned>] [-RegistrarPort <Nullable>] [-Subnet <String>] [-UserSipAddress <String>]
Test-CsLisConfiguration -TargetUri <String> -UserSipAddress <String> [-BssId <String>] [-ChassisId <String>] [-Force <SwitchParameter>] [-Mac <String>] [-OutVerboseVariable <String>] [-PortId <String>] [-PortIdSubType <InterfaceAlias | InterfaceName | LocallyAssigned>] [-Subnet <String>] [-WebCredential <PSCredential>]
Test-CsLisConfiguration [-TargetFqdn <String>] -UserCredential <PSCredential> -UserSipAddress <String> [-BssId <String>] [-ChassisId <String>] [-External <SwitchParameter>] [-Force <SwitchParameter>] [-Mac <String>] [-OutVerboseVariable <String>] [-PortId <String>] [-PortIdSubType <InterfaceAlias | InterfaceName | LocallyAssigned>] [-RegistrarPort <Nullable>] [-Subnet <String>]
Detailed Description
This cmdlet determines whether the Location Information Server (LIS) web service can be contacted based on the information in the supplied parameters. If the web service can be contacted and a location is found that corresponds to any of the supplied parameters, the test is considered to have passed and the location will be displayed. Even if the location is not found, if the web service can be contacted the test will return a pass, but with no location information. In addition, if you call this cmdlet without supplying any of the optional parameters, the test will still pass as long as the web service can be contacted; however, again, no location information will be returned.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Test-CsLisConfiguration 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 "Test-CsConfiguration"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
TargetFqdn |
Required |
String |
The fully qualified domain name (FQDN) (in the form server.litwareinc.com) of the server against which you want to run the test. This parameter is required unless you specify the TargetUri parameter, in which case you cannot specify a TargetFqdn. |
TargetUri |
Required |
String |
The Uniform Resource Identifier (URI) of the Location Information service. You can retrieve the URI of the Location Information service by running the following command: Get-CsService –WebServer | Select-Object LIServiceInternalUri If you specify a value for this parameter, the UserSipAddress parameter is also required. If the computer you are running the command on does not have a server certificate, you must also specify a value for the WebCredential parameter. This parameter is required unless you specify the TargetFqdn parameter. |
UserCredential |
Required |
PSCredential |
An object containing user credentials for accessing the Location Information service. This object can be retrieved by calling the Get-Credential cmdlet and supplying the appropriate credentials. This parameter is required if the TargetFqdn and UserSipAddress parameters are specified, and if the computer from which you’re running the cmdlet does not have a server certificate. |
UserSipAddress |
Required |
String |
The SIP address of a remote user. If you specify a value for this parameter, the TargetFqdn or TargetUri parameter is also required. This parameter is required when you specify the TargetFqdn parameter only if you have not set up synthetic transactions users. To see if synthetic transaction users have been set up, run the Get-CsHealthMonitoringConfiguration cmdlet. |
BssId |
Optional |
String |
The Basic Service Set Identifier (BSSID) of a wireless access point. This value must be in the form nn-nn-nn-nn-nn-nn, such as 12-34-56-78-90-ab. |
ChassisId |
Optional |
String |
The Media Access Control (MAC) address of a network switch. This value must be in the form nn-nn-nn-nn-nn-nn, such as 12-34-56-78-90-ab, or an IP address. |
External |
Optional |
SwitchParameter |
This parameter is not supported for Location Information Server. |
Mac |
Optional |
String |
The MAC address of the port switch. This value must be in the form nn-nn-nn-nn-nn-nn, such as 12-34-56-78-90-ab. |
PortId |
Optional |
String |
The ID of the port associated with the location to test. This can also contain a MAC address or IP address. |
PortIdSubType |
Optional |
PortIDSubType |
The subtype of the port. This value can be entered as a numeric value or a string, but it must be a valid subtype. Valid subtypes are: 1: InterfaceAlias 5: InterfaceName 7: LocallyAssigned |
RegistrarPort |
Optional |
System.Nullable |
The port number of the Registrar service. |
Subnet |
Optional |
String |
The IP address of a subnet. This value should be entered as an IPv4 address (digits separated by periods, such as 192.0.2.0). |
WebCredential |
Optional |
PSCredential |
An object containing user credentials for accessing the Location Information service. This object can be retrieved by calling the Get-Credential cmdlet and supplying the appropriate credentials. This parameter is required if the TargetUri and UserSipAddress parameters are specified, and the computer on which the command is run does not have a server certificate. |
OutVerboseVariable |
Optional |
String |
When present, detailed output from running the cmdlet will be stored in the specified variable. For example, to store output in a variable named $TestOutput use the following syntax: -OutVerboseVariable TestOutput Do not prepend a $ character when specifying the variable name. |
Force |
Optional |
SwitchParameter |
Suppresses any confirmation prompts that would otherwise be displayed before making changes. |
Input Types
None.
Return Types
Test-CsLisConfiguration returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.
Example
-------------------------- Example 1 --------------------------
Test-CsLisConfiguration -TargetFqdn atl-cs-001.litwareinc.com -Subnet 192.168.0.0
This example tests the LIS configuration at the FQDN atl-cs-001.litwareinc.com. The test will be successful if a connection can be made with the current user credentials to the LIS web service at that FQDN. If a location can be found that maps to the subnet IP address 192.168.0.0, then that location address will be returned.
For this command to succeed, a health monitoring configuration containing synthetic transaction users must exist. To see if a health monitoring configuration exists, run the Get-CsHealthMonitoringConfiguration cmdlet. To create a new health monitoring configuration, run the New-CsHealthMonitoringConfiguration cmdlet.
-------------------------- Example 2 --------------------------
Test-CsLisConfiguration -TargetFqdn atl-cs-001.litwareinc.com -Subnet 192.168.0.0 -UserSipAddress sip:kmyer@litwareinc.com
This example is identical to Example 1 but with the addition of the UserSipAddress parameter. Use this command when no synthetic transaction users have been set up, but where the computer on which the command is running has a server certificate.
-------------------------- Example 3 --------------------------
$cred = Get-Credential
Test-CsLisConfiguration -TargetFqdn atl-cs-001.litwareinc.com -Subnet 192.168.0.0 -UserSipAddress sip:kmyer@litwareinc.com -UserCredential $cred
The first line of this example calls a Windows PowerShell cmdlet, Get-Credential, which prompts the user for a user ID and password. This information is stored in an encrypted fashion in the variable $cred.
The second line is identical to the command in Example 2 but with the addition of the UserSipAddress parameter. Use this command when no synthetic transaction users have been set up, and where the computer on which the command is running does not have a server certificate.
-------------------------- Example 4 --------------------------
$cred = Get-Credential
Test-CsLisConfiguration -TargetUri https://atl-cs-001.litwareinc.com/locationinformation/lisservice.svc -UserSipAddress sip:kmyer@litwareinc.com -WebCredential $cred -Subnet 192.168.0.0 -Mac 0A-23-00-00-00-AA -PortId 4500 -ChassisId 0A-23-00-00-00-AA
The first line of this example calls the Get-Credential cmdlet, which prompts the user for a user ID and password. This information is stored in an encrypted fashion in the variable $cred.
Line 2 tests the LIS configuration by making a call to the web service URI (https://atl-cs-001.litwareinc.com/locationinformation/lisservice.svc) based on the SIP address of the remote user (sip:kmyer@litwareinc.com), and using the credentials we obtained in line 1 by passing them to the WebCredential parameter. The test will be successful if a connection can be made with the given user credentials to the LIS web service at that URI. If a location can be found that maps to the subnet IP address 192.168.0.0, the MAC address 0A-23-00-00-00-AA or the Port ID 4500 and ChassisId 0A-23-00-00-00-AA, that location address will be returned.
Use this command when the computer on which the command is running does not have a server certificate.
-------------------------- Example 5 --------------------------
Test-CsLisConfiguration -TargetUri https://atl-cs-001.litwareinc.com/locationinformation/lisservice.svc -UserSipAddress sip:kmyer@litwareinc.com -Subnet 192.168.0.0 -Mac 0A-23-00-00-00-AA -PortId 4500 -ChassisId 0A-23-00-00-00-AA
This example is identical to Example 4, except that the command does not use the WebCredential parameter (and therefore also does not call Get-Credential). Use this command when the computer on which the command is running has a server certificate.