Sunday 2 November 2014

Change LIS from Mumbai to Bangalore

  1. From Lync Management Shell execute the below command
Remove-CsLisSubnet –Subnet 10.10.10.1
  1. Set-CsLisSubnet –Subnet 10.10.10.1 –Location Bangalore –CompanyName “Company” –HouseNumber 1 –StreetName “Gandhi Street” –State Karnataka –PostalCode 5002 –Country IND
  2. Publish-CsLisConfiguration

Lync 2010 Implementation Plan

1. Requirement

a.       Pre-requisites on the Server:
      Windows Powershell 2.0
                 Microsoft .Net Framework 3.5 with SP1
         Windows Installer Version 4.5

   Internet Information Services (IIS)

Static Content
Default Document
HTTP Errors
ASP.NET
.NET Extensibility
Internet Server API (ISAPI) Extensions
ISAPI Filters
HTTP Logging
Logging Tools
Tracing
Windows Authentication
Request Filtering
Static Content Compression
IIS Management Console
IIS Management Scripts and Tools
Anonymous Authentication (This is installed by default when IIS is installed.)
Client Certificate Mapping Authentication

     Windows Media Format Runtime
     Microsoft Silverlight
     Messaging Queue (MSMQ)
               Software Automatically Installed by Lync Server 2010

Microsoft Visual C++ 2008 Redistributable 
Microsoft Visual J# version 2.0 Redistributable
URL Rewrite Module version 2.0 Redistributable
SQL Server 2008 Express SP1
SQL Server 2008 Native Client

    b.  DNS Requirements

We need to edit DNS record for the Lync pool to include the new servers. We need to add DNS A records point to our new FE servers (Testlyncfe01 & Testlyncfe02) for the FQDN of our Lync pool (TestLyncPool01.heiway.net) and DNS A records for Microsoft Lync Server 2010 client auto configuration point to new FEs under SIP zone in internal DNS. Also update the records with new Lync Front End Server’s IPs on sip.domain.local and sip.domain.com as well.

c. Certificate Requirements

Add 2 more SAN Entries “Testlyncfe03 and Testlyncfe04” on the Certificate (TestLyncPool01.heiway.net) from Existing Frontend Server (Testlyncfe01 & Testlyncfe02). Install the new certificate on the all the Front End Servers (Testlyncfe01Testlyncfe02, Testlyncfe03 and Testlyncfe04)

d. HLB Requirements

Add the new Front End Servers on the Hardware Load balancer and update the new certificate on HLB  


Ports needs to be open between new Front End Servers and Edge Servers.

2. Deployment Process

Actions
Responsible Team
Installation of Pre-requisites on the Server

DNS A and SRV Records creation and modification

Server Certificate

Hardware Load Balancer Configuration

Installation of Lync Server Application

Firewall Configuration

OPCO Firewall configuration



                                            I.            Log on to the server (TestLyncfe01/TestLyncfe02) where you installed Topology Builder.
                                          II.            Open “Lync Server Topology Builder” from the Microsoft Lync Server 2010 menu.
                                        III.            On the Welcome page, click Download Topology from Existing Deployment. Click OK.
                                         IV.            A “Save Topology As” box will come up. Choose a location, name the file and save it. (Keep the “.tbxml” extension.)
                                          V.            In Topology Builder, click to expand the Server Role tree view.
                                        VI.            Right-click “Enterprise Pool (TestLyncPool01)”.
                                        VII.            Click New Server.
                                        VIII.            On the “Define the Server” page that comes up. Enter your Lync New FE FQDN (TestLyncfe05.domain.com), Enter IP address (xx.xx.xx.xx) on Primary IP address & PSTN IP Address and click OK.
Notes: Repeat the above for TestLyncfe06 with FQDN as TestLyncfe05.domain.com and IP Address as xx.xx.xx.xx

g.       Publish the Edited Topology

                                                                    I.            Right-click the Lync Server 2010 node.
                                                                  II.            Click Publish Topology.
                                                                III.            Click Next on the first “Publish the Topology” page.
                                                                IV.            Next, you have the “Create Databases” page. Select the databases you want to publish.
Click OK once you have selected an option. Then click Next
                                                                   V.            Select a Front End pool on the “Select Central Management Server” page.
Click
 Next to complete the publishing process.
                                                                  VI.            When it is done, click Finish. Now the new server needs a local configuration store.

h.       Install the Local Configuration Store on the New Server

                                                                    I.            Take the Lync Server installation media. Load it on the new server (TestLyncfe05.domain.com).
                                                                  II.            Browse to setupamd64Setup.exe and click OK.
                                                                  III.            Click OK on the “Lync Server 2010 Installation Location” page. Accept the license terms.
                                                                  IV.            Click Install or Update Lync Server System on the Deployment Wizard page.
                                                                  V.            Click Next until you get to “Step1: Install Local Configuration Store”. Click Run. Make sure the “Retrieve Configuration Automatically from the Central Management Store” option is selected on the configuration page. Then click Next.
                                                                VI.            Click Finish when the install is done.
                                       Notes: Repeat the above steps on TestLyncfe05.domain.com

i.       Install Lync Server 2010 on the New Server

                                                                    I.            On TestLyncfe05, On the “Microsoft Lync Server 2010 – Deployment Wizard” page, click Next until you get to “Step 2: Setup or Remove Lync Server Components”.
                                                                  II.            Click Run.
                                                                III.            Click Next on the “Setup Lync Server Components” page.
                                                                IV.            Click Finish when the task status completes.
                                      Notes: Repeat the above steps on TestLyncfe05.domain.com

j.       Configure a Default Certificate for the New Server

                                                                    I.            On the “Microsoft Lync Server 2010 – Deployment Wizard” page, click Next to get to “Step 3: Request, Install or Assign Certificates”.
                                                                  II.            Click Run.
                                                                III.            Click Import on the “Certificate Wizard” page.
                                                                IV.            Once the imported Certificate is assigned. click Close on the “Certificate Wizard” page

k.      Start the New Server

                                                                    I.            Once again on the “Microsoft Lync Server 2010 – Deployment Wizard” page, click Next to get to “Step 4: Start Services”.
                                                                  II.            Click Run.
                                                                  III.            Click Next to start the new Lync Server's services.
                                                  IV         Once all services start up, click Finish
   4. Test Plan

We will check the Lync Services on TestLyncfe05 and TestLyncfe06 by performing below tests,
1.       Check the Lync Services
2.       Telnet the required ports
3.       Check the Event Viewer for error logs
1.       Stop the services on TestLyncfe01TestLyncfe02TestLyncfe03 and TestLyncfe04 to check the traffic.

5.     Impact and Risk

N   Impact and risk associated with this change as the existing Lync Front End Servers will be install with new certificate one by one






Lync Delegation Access

RBAC roles used to define the management tasks that users allowed to carry out, and to determine the scope in which users will be allowed to perform these tasks.


Perform the following command from Lync Management Shell:

New-CsAdminRole -Identity "BLR-LyncUserAdmins-IND" -ConfigScopes "site:1" -UserScopes "OU:ou=Blr,dc=Domain,dc=com" -Template CSUserAdministrator

CSUserAdministrator: - Administrator Security group that provide required permission to perform activities. Command will automatically create this group.

Lync Monitoring Reports

Open Lync Control Panel
Double Click on “1-MonitoringServer-3”
Internet explorer open with All the reports.
Go to User Activity Report
Please select the Date & Time Period for requested User Sip address/Name and click on view report button
For exporting Monitoring report, to select appropriate file format and click on export button

Extracting the SIP Domain based Lync Usage Report from SQL Server 2008

Login to SQL Server
Run SQL Server Management Studio
Click Connect
Click “LCSCDR” database and New Query
Copy and paste the below SQL Query to SQL Management Studio – Query Window and change the date accordingly to your requirement and Use the correct SQL Query for respective locations. The same query can be modifying for different locations with multiple sip domain names. Click on “Execute” to run the query.

*******************************************************************
select distinct (select a.UserUri from Users a where a.UserId = b.User1Id) From_user,(select a.UserUri from Users a where a.UserId = b.User2Id) To_User ,case when b.MediaTypes = 1 then 'IM'
when b.MediaTypes = 2 then 'File Transfer'
when b.MediaTypes = 4 then 'Remote Assitance'
when b.MediaTypes = 8 then 'Application Sharing'
when b.MediaTypes = 16 then 'Audio'
when b.MediaTypes = 32 then 'Video'

when b.MediaTypes = 64 then 'App Invite'
else 'None' end 'Modality'  ,b.InviteTime,b.SessionEndTime from Users a
join SessionDetails b
on a.UserId = b.User1Id
where (select a.UserUri from Users a where a.UserId = b.User1Id) like '%SipDomain%'
and b.InviteTime < '2014-11-01 00:00:01.000'

and b.InviteTime > '2014-10-01 00:00:01.000'
***********************************************************************
Results will be pop-up after running the query, Click to select all the cells

Click “Save Result As
Save the File in CSV Format 
Change the CSV file to Excel file by clicking on “Save As” and format the excel file into below format,

Extracting the Report of Client Version who are currently logged in

Login to Lync SQL Server
Open SQL Server Management Studio
Please ensure you enter the below details while connecting to server
Click New Query
Paste the below query

*************************************************************************
USE rtcdyn
SELECT COUNT(*) as Occurrences,
CAST(rtcdyn.dbo.RegistrarEndpoint.ClientApp as varchar(100)) as 'Client Version'
from rtcdyn.dbo.RegistrarEndpoint
WHERE IsServerSource = 0
group by CAST(rtcdyn.dbo.RegistrarEndpoint.ClientApp as varchar(100))

order by CAST(rtcdyn.dbo.RegistrarEndpoint.ClientApp as varchar(100))
SELECT rtc.dbo.Resource.UserAtHost as 'SIP Address', CAST(rtcdyn.dbo.RegistrarEndpoint.ClientApp as varchar(100)) as 'Client Version'
FROM rtcdyn.dbo.RegistrarEndpoint
INNER JOIN rtc.dbo.Resource
ON rtcdyn.dbo.RegistrarEndpoint.OwnerId = rtc.dbo.Resource.ResourceId
WHERE IsServerSource = 0
***************************************************************************

Click Execute
Now copy and paste the output results in the text file
Similarly save the output results of SIP address and Client version

Tuesday 2 September 2014

Exchange Availability Report

Add-PSSnapin *exchange*
$report1 = "C:\dailyreports\Test.availability\Test.availability.htm"
Clear-Content $report1
Add-Content $report1 "<html>"
Add-Content $report1 "<head>"
Add-Content $report1 "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
Add-Content $report1 '<title>Availability report for Exchange servers</title>'
add-content $report1 '<STYLE TYPE="text/css">'
add-content $report1  "<!--"
add-content $report1  "td {"
add-content $report1  "font-family: Tahoma;"
add-content $report1  "font-size: 11px;"
add-content $report1  "border-top: 1px solid #999999;"
add-content $report1  "border-right: 1px solid #999999;"
add-content $report1  "border-bottom: 1px solid #999999;"
add-content $report1  "border-left: 1px solid #999999;"
add-content $report1  "padding-top: 0px;"
add-content $report1  "padding-right: 0px;"
add-content $report1  "padding-bottom: 0px;"
add-content $report1  "padding-left: 0px;"
add-content $report1  "}"
add-content $report1  "body {"
add-content $report1  "margin-left: 5px;"
add-content $report1  "margin-top: 5px;"
add-content $report1  "margin-right: 0px;"
add-content $report1  "margin-bottom: 10px;"
add-content $report1  ""
add-content $report1  "table {"
add-content $report1  "border: thin solid #000000;"
add-content $report1  "}"
add-content $report1  "-->"
add-content $report1  "</style>"
Add-Content $report1 "</head>"
Add-Content $report1 "<body>"
add-content $report1 "<table width='100%'>"
add-content $report1  "<tr bgcolor='#CCCCCC'>"
add-content $report1  "<td colspan='7' height='25' align='center'>"
add-content $report1  "<font face='tahoma' color='#003399' size='4'><strong>Server Name</strong></font></td></tr></table>"
add-content $report1  "<table width='100%'>"
Add-Content $report1 "<tr bgcolor=#CCCCCC>"
Add-Content $report1  "<td width='10%' align='center'>ServerName</td>"
Add-Content $report1  "<td width='10%' align='center'>Timegenerated</td>"
Add-Content $report1 "<td width='10%' align='center'>EventId</td>"

Add-Content $report1 "</tr>"

$all = (get-eventlog System -ComputerName TestExchSvr -After 7/1/2014 | Where-Object {($_.eventid -eq "6005") -or ($_.eventid -eq "6006")})

Set-ADServerSettings -ViewEntireForest $True
foreach ($a in $all)
  { 

$Machinename=$a.Machinename
$Time=$a.timegenerated
$EventId=$A.eventId
      
Add-Content $report1 "<td align=center width='20%' align='center' bgcolor='#00FF00'>$Machinename</td>"
Add-Content $report1 "<td align=center width='20%' align='center' bgcolor='#00FF00'>$Time</td>"
Add-Content $report1 "<td align=center width='20%' align='center' bgcolor='#00FF00'>$EventId</td>"

Add-Content $report1 "</tr>"

}

Add-Content $report1 "</table>"

Add-Content $report1 "</body></html>"

$from = "exchangemonitoring@testsvr.com"
$to = "vishwajeet.sharma@testsvr.com"
$subject = "Availability Report- Exchange Servers"
$body = Get-Content $report1
$smtp= New-Object System.Net.Mail.SmtpClient 
$msg = New-Object System.Net.Mail.MailMessage $from, $to, $subject, $body
$msg.isBodyhtml = $true
$smtp.Host = "192.168.1.3"
$smtp.send($msg)
exit 0