Edit

Share via


Test-CsDatabase

Tests the configuration of the Skype for Business Server databases. This cmdlet was introduced in Lync Server 2013.

Syntax

ByCMS

Test-CsDatabase
    [-CentralManagementDatabase]
    [-SqlServerFqdn <Fqdn>]
    [-Confirm]
    [-Report <String>]
    [-SqlInstanceName <String>]
    [-WhatIf]
    [<CommonParameters>]

ByConfigured

Test-CsDatabase
    -SqlServerFqdn <Fqdn>
    [-ConfiguredDatabases]
    [-Confirm]
    [-Report <String>]
    [-WhatIf]
    [<CommonParameters>]

ByDatabase

Test-CsDatabase
    -DatabaseType <DatabaseNameType>
    -SqlServerFqdn <Fqdn>
    [-Confirm]
    [-Report <String>]
    [-SqlInstanceName <String>]
    [-WhatIf]
    [<CommonParameters>]

ByLocal

Test-CsDatabase
    [-LocalService]
    [-Confirm]
    [-Report <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

The Test-CsDatabase cmdlet verifies connectivity to one or more Skype for Business Server databases. When run, the Test-CsDatabase cmdlet reads the Skype for Business Server topology, attempts to connect each of the relevant databases, and then reports back the success or failure of each attempt. If a connection can be made, the cmdlet will also report back such information as the database name, SQL Server version information, and the location of any installed mirror databases.

Skype for Business Server Control Panel: The functions carried out by the Test-CsDatabase cmdlet are not available in the Skype for Business Server Control Panel.

Examples

Example 1

Test-CsDatabase -CentralManagementDatabase

The command shown in Example 1 verifies the configuration of the Central Management database.

Example 2

Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "atl-sql-001.litwareinc.com"

Example 2 verifies all the Skype for Business Server databases installed on the computer atl-sql-001.litwareinc.com.

Example 3

Test-CsDatabase -DatabaseType "Archiving" -SqlServerFqdn "atl-sql-001.litwareinc.com" -SqlInstanceName "archinst"

In Example 3, verification is performed only for the Archiving database installed on the computer atl-sql-001.litwareinc.com. Note that the SqlInstanceName parameter is included to specify the SQL Server instance (Archinst) where the Archiving database is located.

Example 4

Test-CsDatabase -LocalService

The command shown in Example 4 verifies the databases installed on the local computer.

Parameters

-CentralManagementDatabase

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

Tests the configuration of the Central Management database. This parameter cannot be used in conjunction with the ConfiguredDatabases parameter or the DatabaseType parameter.

Parameter properties

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

Parameter sets

ByCMS
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConfiguredDatabases

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

Tests the configuration of all the Skype for Business Server databases installed on the specified computer. You must include the SqlServerFqdn parameter when using the ConfiguredDatabases parameter. In addition, this parameter cannot be used in the same command as the CentralManagementDatabase or the DatabaseType parameters.

Parameter properties

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

Parameter sets

ByConfigured
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: 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

-DatabaseType

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

Type of database to be validated. Allowed values are:

Valid values for DatabaseType are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

Parameter properties

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

Parameter sets

ByDatabase
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LocalService

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

Validates all the databases used by any of the Skype for Business Server services that are installed on the local computer. This includes not only locally-installed databases but also databases installed on remote computers, provided those databases are used by one or more local services.

Parameter properties

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

Parameter sets

ByLocal
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Report

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

Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\TestDatabases.html"

Parameter properties

Type:String
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

-SqlInstanceName

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

SQL Server instance where the databases to be validated are installed. For example:

-SqlInstanceName "rtc"

Parameter properties

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

Parameter sets

ByCMS
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByDatabase
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlServerFqdn

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

Fully qualified domain name of the computer whether the databases to be validated are installed.

Parameter properties

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

Parameter sets

ByCMS
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByConfigured
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByDatabase
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: 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

None

The Test-CsDatabase cmdlet does not accept pipelined input.

Outputs

Microsoft.Rtc.SyntheticTransactions.TaskOutput

The Test-CsDatabase cmdlet returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.