The database and Management Server cmdlets are used to manage both Skype for Business Server 2015 back-end databases and front-end management services.

Get-CsConfigurationStoreLocation

Active Directory Domain Services uses service control points (SCP) to help computers locate services.

For example, when you install Skype for Business Server 2015, a service control point is created that provides location information for the Central Management store used to maintain Skype for Business Server 2015 data.

Computers that need access to the database connect to Active Directory and use the information contained in the SCP to help them locate the correct computer and the correct instance of SQL Server.

  • Get-CsConfigurationStoreLocation
  • Reports back the location of the Active Directory service control point for the Central Management store. 

  • Set-CsConfigurationStoreLocation -SqlServerFqdn sql01.litwareinc.com -SqlInstanceName Rtc
  • Sets the Active Directory service control point for the Central Management store. 

  • Remove-CsConfigurationStoreLocation
  • Removes the Active Directory service control point for the Central Management store.

Install-CsDatabase

On rare occasions, you might need to manually install a Skype for Business Server 2015 database; this could be because you need to move a database to another server, or because a setup-related problem failed to install the database for you.

The Install-CsDatabase cmdlet provides a way for you to install any of the SQL Server databases used by Skype for Business Server 2015.

  • Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn sql01.litwareinc.com -SqlInstanceName rtc – UseDefaultSqlPaths
  • Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn sql01.litwareinc.com – UseDefaultSqlPaths
  • Uninstall-CsDatabase -CentralManagementDatabase -SqlServerFqdn sql01.litwareinc.com

Move-CsManagementServer

The Move-CsManagementServer cmdlet enables administrators to move the Central Management Server (and the accompanying Central Management store) from one pool to another.

When you do that, the Move-CsManagementServer cmdlet will consult the topology to determine the prior location of the Central Management Server (Pool A), and then transfer the Central Management Server and the Central Management store to the current pool (Pool B).

Test-CsDatabase

The Test-CsDatabase cmdlet verifies connectivity to one or more Lync Server 2013 databases.

When run, the Test-CsDatabase cmdlet reads the Lync Server topology, attempts to connect each of the relevant databases, and then reports back the success or failure of each attempt.

  • Test-CsDatabase -LocalService
  • Verifies the databases installed on the local computer.

  • Test-CsDatabase –CentralManagementDatabase
  • Verifies the configuration of the Central Management database.

  • Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "atl-sql-001.litwareinc.com"
  • Verifies all the Lync Server databases installed on the computer atl-sql-001.litwareinc.com.

  • Test-CsDatabase -DatabaseType "Archiving" -SqlServerFqdn "atl-sql-001.litwareinc.com" -SqlInstanceName "archinst"
  • Verification is performed only for the Archiving database installed on the computer atl-sql-001.litwareinc.com.

Valid values for DatabaseType are:

Application, Archiving, CentralAdmin, CentralMgmt, Edge, Lyss, Monitoring, PersistentChat, PersistentChatCompliance, Provision, Registrar, User.

Get-CsUserDatabaseState

Skype for Business Server 2015 employs the user database (also known as the user store) to maintain presence and routing information for Skype for Business Server 2015 users.

The Get-CsUserDatabaseState cmdlet provides a way to verify the current status (either online or offline) for any of the user databases currently in use in your organization.

Update-CsUserDatabase

The Skype for Business Server 2015 user database holds detailed information about such things as contacts, groups, and access permissions. As such, the database is required to periodically synch its contents with the information stored in Active Directory.

More often than not, the automatic synch between the user database and Active Directory will keep the information in the user database up to date.

However, it is possible that a problem might occur that prevents this automatic synchronization from taking place. In a case such as that, you can use the Update-CsUserDatabase cmdlet to force the user database to refresh its contents by re-reading all of the user information stored in Active Directory.

You might also need to run this cmdlet if a product update ever includes a change to the user replicator service.

  • Update-CsUserDatabase
  • Locates the user database for the pool where the local computer is located, then forces that database to connect to and return complete user information from Active Directory.

  • Update-CsUserDatabase -Fqdn atl-cs-001.litwareinc.com
  • Force a specific user database to re-read data from Active Directory.

Get-CsManagementStoreReplicationStatus

When an administrator makes a change of some kind to Skype for Business Server 2015 (for example, when an administrator creates a new voice policy or changes the Address Book Server configuration settings) that change is recorded in the Central Management store.

In turn, the change must then be replicated to all the computers running Skype for Business Server 2015 services or server roles.

The Get-CsManagementStoreReplicationStatus cmdlet enables you to verify the replication status for any (or all) of the Skype for Business Server 2015 computers in your organization.

  • Get-CsManagementStoreReplicationStatus –CentralManagementStoreStatus

CentralManagementStoreStatus parameter return detailed information about the current status of the Central Management store. This includes the fully qualified domains names of the Active Master and the File Transfer Agent services as well as the date and time of the last heartbeat detected for each of those services.

Invoke-CsManagementStoreReplication

Typically, replication works on an incremental basis: when data is replicated, only the changes are replicated, not the complete set of configuration data.

However, when you call the Invoke-CsManagementStoreReplication cmdlet, you force a complete replication of all the data rather than the more typical replication of changes only.

Note that replication will not necessarily take place immediately when you call the Invoke-CsManagementStoreReplication cmdlet. Instead, there could be a two to three-minute delay as changes are processed by the Master Replicator.

Install-CsMirrorDatabase

Mirror databases enable you to simultaneously maintain two copies of a database.

You can “failover” to the mirror database with minimal disruption to your users and with minimal data loss. After you have installed your primary databases you can then install and configure mirror databases by using the Install-CsMirrorDatabase cmdlet.

  • Install-CsMirrorDatabase -ConfiguredDatabases -FileShare "\\atl-fs-001\DbBackup" -SqlServerFqdn "atl-primary-001.litwareinc.com" –DropExisitingDatabasesOnMirror
    The ConfiguredDatabases parameter causes the Install-CsMirrorDatabase cmdlet to use the current topology to determine which databases should be.
  • Get-CsDatabaseMirrorState -PoolFqdn "atl-cs-001.litwareinc.com" -DatabaseType Monitoring

Returns the state of the database mirror assigned to the monitoring database for the pool atl-cs-001.litwareinc.com.

  • Uninstall-CsMirrorDatabase -SqlServerFqdn "atl-mirror-001.litwareinc.com" -SqlInstanceName "RTC" -DatabaseType "User" –DropExistingDatabasesOnMirror
    Uninstalls the user database from the SQL Server instance RTC on the computer atl-mirror-001.litwareinc.com. Because the DropExistingDatabaseOnMirror parameter was included, the command will also delete the actual User database mirror.

 

Ref. Skype for Business Server cmdlets index.

https://technet.microsoft.com/en-us/library/gg398867.aspx

Advertisements