編輯

共用方式為


Test-CsDatabase

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

Syntax

Test-CsDatabase
    [-CentralManagementDatabase]
    [-SqlServerFqdn <Fqdn>]
    [-Confirm]
    [-Report <String>]
    [-SqlInstanceName <String>]
    [-WhatIf]
    [<CommonParameters>]
Test-CsDatabase
    [-ConfiguredDatabases]
    -SqlServerFqdn <Fqdn>
    [-Confirm]
    [-Report <String>]
    [-WhatIf]
    [<CommonParameters>]
Test-CsDatabase
    -DatabaseType <DatabaseNameType>
    -SqlServerFqdn <Fqdn>
    [-Confirm]
    [-Report <String>]
    [-SqlInstanceName <String>]
    [-WhatIf]
    [<CommonParameters>]
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

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

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-ConfiguredDatabases

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.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-DatabaseType

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

Type:DatabaseNameType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-LocalService

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.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Report

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

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-SqlInstanceName

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

-SqlInstanceName "rtc"

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-SqlServerFqdn

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

Type:Fqdn
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

None. The Test-CsDatabase cmdlet does not accept pipelined input.

Outputs

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