Edit

Share via


Uninstall-CsDatabase

Deletes the specified Skype for Business Server database. This cmdlet was introduced in Lync Server 2010.

Syntax

ByCMS

Uninstall-CsDatabase
    -SqlServerFqdn <Fqdn>
    [-CentralManagementDatabase]
    [-Detach]
    [-SqlInstanceName <String>]
    [-Force]
    [-Report <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByDatabase

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

Description

Skype for Business Server makes extensive use of SQL Server databases such as the Central Management store and the Archiving database. These databases are set up at the same time you install Skype for Business Server or at the same time you install a Skype for Business Server role that requires a database back end. After the databases have been installed, you will rarely need to uninstall them.

However, it is possible that you might need to uninstall a Skype for Business Server database at some point; for example, a hardware failure or an issue with network connectivity might make an existing database unusable. Regardless of the reason, the Uninstall-CsDatabase cmdlet provides a way for you to remove or detach any of the SQL Server databases used by Skype for Business Server.

Examples

Example 1

Uninstall-CsDatabase -CentralManagementDatabase -SqlServerFqdn atl-sql-001.litwareinc.com

The command shown in Example 1 deletes the Central Management store from the computer atl-sql-001.litwareinc.com.

Example 2

Uninstall-CsDatabase -DatabaseType User -SqlServerFqdn atl-sql-001.litwareinc.com

In Example 2, the User database is deleted from the computer atl-sql-001.litwareinc.com. When you use the DatabaseType parameter, all stores related to the specified database are deleted.

Parameters

-CentralManagementDatabase

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

If present, uninstalls the Central Management store. You cannot use both CentralManagementDatabase and DatabaseType in the same command.

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

-Confirm

Applicable: Lync Server 2010, 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 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Database to be deleted. Valid values are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

To delete the Central Management store, use the CentralManagementDatabase parameter.

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

-Detach

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

If present, detaches the specified database. When a database is detached, all the file locks imposed by SQL Server are removed. This enables you to directly access the database files in order to do such things as copy those files to another computer.

Parameter properties

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

-Force

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

If present, forces removal of the database even if that database is currently in use.

Parameter properties

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

-Report

Applicable: Lync Server 2010, 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\UninstallDatabase.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 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Name of the database instance containing the database to be removed. A database instance is a set of running processes that provides access to database files.

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

-SqlServerFqdn

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

Fully qualified domain name (FQDN) of the computer or SQL Server cluster where the database is located. For example: -SqlServer atl-sql-001.litwareinc.com.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Lync Server 2010, 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 Uninstall-CsDatabase cmdlet does not accept pipelined input.

Outputs

None

The Uninstall-CsDatabase cmdlet does not return any values or objects.