Wednesday, June 17, 2015

How to take backup of User Lync Contact list of all user homed on pool In Lync 2010 and then restore the contact of all users homed on pool

How to take backup of User Lync Contact list of all user homed on pool In Lync 2010 and then restore the contact of all users homed on pool


PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support> .\DBImpExp.
exe /sqlserver:"lchlncdbl01.labbsci.labbossci.com\lab" /hrxmlfile:"C:\absabhi.zi
p"
SQL Schema Version: 59
User Data Schema Version : 21
Exporting 30 Homed Resource(s) from database...
100% complete.
Exporting 1 Conference Directory(s) from database...
100% complete.
Export completed successfully.

-----------

PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support> .\DBImpExp
exe /import /sqlserver:"lchlncdbl01.labbsci.labbossci.com\lab" /hrxmlfile:"C:\a
sabhi.zip"  /restype:user
SQL Schema Version: 59
User Data Schema Version : 21
Importing Homed Resources into database...
30 Resource(s) imported.
Import completed successfully.
Reindexing all tables and updating statistics.
PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support>


How to take backup of single User Lync Contact list In Lync 2010 and then restore the contact

How to take backup of User Lync Contact list In Lync 2010 and then restore the contact

PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support> .\DBImpExp.
exe /user:abhishek.gupta@bsci.com /sqlserver:"lchlncdbl01.labbsci.labbossci.com\
lab" /hrxmlfile:"C:\absabhi.zip"
SQL Schema Version: 59
User Data Schema Version : 21
Error: The specified user was not found in the database.
PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support> .\DBImpExp.
exe /user:abhishek.gupta@labbsci.com /sqlserver:"lchlncdbl01.labbsci.labbossci.c
om\lab" /hrxmlfile:"C:\absabhi.zip"
SQL Schema Version: 59
User Data Schema Version : 21
Exporting 1 Homed Resource(s) from database...
100% complete.
Export completed successfully.
PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support> .\DBImpExp.
exe /import /user:abhishek.gupta@labbsci.com /sqlserver:"lchlncdbl01.labbsci.lab
bossci.com\lab" /hrxmlfile:"C:\absabhi.zip"  /restype:user
SQL Schema Version: 59
User Data Schema Version : 21
Importing Homed Resources into database...
1 Resource(s) imported.
Import completed successfully.

PS C:\Program Files\Common Files\Microsoft Lync Server 2010\Support>

how to retrieve the SQL serverand instance name for any back-end pool database

how to retrieve the SQL serverand instance name for any back-end pool database

1. Get-CsService -Registrar -Pool Fqdn <poolFqdn> (poolFqdn = Fqdn of the pool you want)
2. Get-CsService -UserServer –PoolFqdn <poolFqdn> (note the “UserDatabase” property for step #3)
3. Get-CsService -UserDatabase –PoolFqdn <use the UserDatabase property from step #2>
The SQL user database for the pool is the SqlServer property appended with the \SqlInstance property.  

PS C:\> Get-CsService -Registrar -PoolFqdn lchlncpool01.labbsci.labbossci.com


Identity                  : Registrar:lchlncpool01.labbsci.labbossci.com
MonitoringServer          :
ArchivingServer           :
WebServer                 : WebServer:lchlncpool01.labbsci.labbossci.com
EdgeServer                :
UserServer                : UserServer:lchlncpool01.labbsci.labbossci.com
SipPort                   : 5061
WebPort                   : 444
SipHealthPort             :
SipServerTcpPort          :
EnableAutomaticFailover   : True
FailbackDetectionInterval : 00:10:00
FailureDetectionInterval  : 00:05:00
BackupRegistrar           : Registrar:lrolncpool01.labbsci.labbossci.com
DependentServiceList      : {MediationServer:lchlncpool01.labbsci.labbossci.com
                            , ApplicationServer:lchlncpool01.labbsci.labbossci.
                            com}
ServiceId                 : 2-Registrar-1
SiteId                    : Site:STP 2 Lab
PoolFqdn                  : lchlncpool01.labbsci.labbossci.com
Version                   : 5
Role                      : Registrar



PS C:\> Get-CsService -UserServer -PoolFqdn lchlncpool01.labbsci.labbossci.com


Identity                  : UserServer:lchlncpool01.labbsci.labbossci.com
UserDatabase              : UserDatabase:lchlncdbl01.labbsci.labbossci.com
ConferenceServer          : ConferencingServer:lchlncpool01.labbsci.labbossci.c
                            om
MediaOnlyConferenceServer :
McuFactorySipPort         : 444
DependentServiceList      : {Registrar:lchlncpool01.labbsci.labbossci.com, WebS
                            erver:lchlncpool01.labbsci.labbossci.com, Conferenc
                            ingServer:lchlncpool01.labbsci.labbossci.com}
ServiceId                 : 2-UserServices-1
SiteId                    : Site:STP 2 Lab
PoolFqdn                  : lchlncpool01.labbsci.labbossci.com
Version                   : 5
Role                      : UserServer



PS C:\> Get-CsService -UserDatabase -PoolFqdn lchlncdbl01.labbsci.labbossci.com


Identity             : UserDatabase:lchlncdbl01.labbsci.labbossci.com
SqlInstanceName      : lab
DependentServiceList : {UserServer:lchlncpool01.labbsci.labbossci.com}
ServiceId            : 2-UserStore-1
SiteId               : Site:STP 2 Lab
PoolFqdn             : lchlncdbl01.labbsci.labbossci.com
Version              : 5
Role                 : UserDatabase



PS C:\>

How to find Roles of Servers In Lync

How to find Roles of Servers In Lync


PS C:\> Get-CsService | Select-Object Role, PoolFqdn | Sort-Object PoolFqdn, Role

Role                                    PoolFqdn
----                                    --------
PstnGateway                             132.189.0.51
ApplicationDatabase                     lchlncdbl01.labbsci.labbossci.com
FileStore                               lchlncdbl01.labbsci.labbossci.com
UserDatabase                            lchlncdbl01.labbsci.labbossci.com
ApplicationServer                       lchlncpool01.labbsci.labbossci.com
ConferencingServer                      lchlncpool01.labbsci.labbossci.com
MediationServer                         lchlncpool01.labbsci.labbossci.com
Registrar                               lchlncpool01.labbsci.labbossci.com
UserServer                              lchlncpool01.labbsci.labbossci.com
WebServer                               lchlncpool01.labbsci.labbossci.com
ConferencingServer                      lrolncavpool01.labbsci.labbossci.com
ApplicationDatabase                     lrolncdbl01.labbsci.labbossci.com
CentralManagementDatabase               lrolncdbl01.labbsci.labbossci.com
FileStore                               lrolncdbl01.labbsci.labbossci.com
UserDatabase                            lrolncdbl01.labbsci.labbossci.com
Registrar                               lrolncdrpool01.labbsci.labbossci.com
WebServer                               lrolncdrpool01.labbsci.labbossci.com
ApplicationServer                       lrolncpool01.labbsci.labbossci.com
CentralManagement                       lrolncpool01.labbsci.labbossci.com
ConferencingServer                      lrolncpool01.labbsci.labbossci.com
MediationServer                         lrolncpool01.labbsci.labbossci.com
Registrar                               lrolncpool01.labbsci.labbossci.com
UserServer                              lrolncpool01.labbsci.labbossci.com
WebServer                               lrolncpool01.labbsci.labbossci.com


PS C:\>