[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Enables (or disables) one or more Microsoft Communications Server 2010 user databases.


Set-CsUserDatabaseState -Online <$true | $false> -RegistrarPool <Fqdn> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Set-CsUserDatabaseState -Identity <String> -Online <$true | $false> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description




Unique identifier of the user database whose online status is to be modified. For example: -Identity Redmond-UserStore-1.

You cannot use both –Identity and –RegistrarPool in the same command, nor can you use wildcards with either parameter.




Fully qualified domain name of the Registrar pool hosting the user databases whose online status is to be modified. For example: -RegistrarPool atl-cs-001.litwareinc.com.

You cannot use both –Identity and –RegistrarPool in the same command, nor can you use wildcards with either parameter.




When set to True ($True), makes a database available online. When set to False ($False), takes a database offline.



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


Prompts you for confirmation before executing the command.

Detailed Description

Microsoft Communications Server 2010 employs the user database (also known as the user store) to maintain presence and routing information for Communications Server users. The Set-CsUserDatabaseState cmdlet provides a way for you change the state of one or more user databases: you can use the cmdlet to take a database offline, or to bring a disabled database back online.

Return Types

Set-CsUserDatabaseState modifies existing instances of the Microsoft.Rtc.Management.Xds.UserStoreState object.


-------------------------- Example 1 ------------------------

Copy Code
Set-CsUserDatabaseState -Identity Redmond-UserStore-1 -Online $False

The command shown in Example 1 takes the user database Redmond-UserStore-1 offline. This is done by setting the Online property to $False.

-------------------------- Example 2 ------------------------

Copy Code
Set-CsUserDatabaseState -RegistrarPool atl-cs-001.litwareinc.com -Online $False

In Example 2, all the user databases on the Registrar pool atl-cs-001.litwareinc.com are taken offline.

-------------------------- Example 3 ------------------------

Copy Code
Get-CsUserDatabaseState | Where-Object {$_.Online -eq $False} | ForEach-Object {Set-CsUserDatabaseState -Identity $_.Identity -Online $True}

The preceding example locates all the user databases that are currently offline and then brings them back online. To do this, the command first calls Get-CsUserDatabaseState without any parameters in order to return a collection of all the user databases in the organization. This collection is then piped to the Where-Object cmdlet, which picks out only those databases where the Online property is equal to (-eq) False ($False). The filtered collection is then piped to the ForEach-Object cmdlet, which takes each database in the collection and sets the Online property to True ($True). Note that the collection of offline databases must be piped to ForEach-Object rather than Set-CsUserDatabaseState; that’s because the latter cmdlet cannot directly accept pipelined information.