Sunday, July 17, 2016

Disaster Recovery for SharePoint farms in Microsoft Azure IaaS using Azure Recovery Services

I had to implement Disaster Recovery (DR) strategy to one of my SharePoint farms deployed in Microsoft Azure. I used Azure Recovery Services to achieve the goal in addition to SharePoint site collection backups.

Following are the steps I used to create a recovery vault in my Microsoft Azure environment to protect my Virtual Machines

1. Look for Recovery Services vaults in Azure portal


2. Create a new vault


3. Select if you need locally redundant or geo-redundant storage. I selected locally redundant storage as my budget was limited


4. In this section we are creating a new Backup policy for Virtual Machines



5. In backup policy, specify required retention


6. Add virtual machines to the backup policy


7. Click on backup jobs to see the current status


8. We can see the backup configuration task has completed


9. But that’s not all. We have to execute the initial backup. Click on Azure Virtual Machines node to navigate to check current status



10. We have to select one Virtual Machine at a time to execute the initial backup



11. Once we run the initial backup job for each and every Virtual Machine in our SharePoint farm, we can see a result similar to the following


12. Once it is backed up according to the schedule, we can check the latest restore point as shown below



That is the easiest way to implement disaster recovery for a SharePoint farm hosted in Microsoft Azure.

Sunday, July 10, 2016

SharePoint 2013 in Azure IaaS–Map public url to internal DNS

One of my SharePoint environments was recently deployed in Microsoft Azure IaaS. I have following servers in that environment

  • Active Directory
  • SQL Server
  • Analysis Services Server
  • SharePoint Server

I have deployed the farm accordingly and created host named site collection using public URL “”.

I used following command to create the host based site collection

New-SPSite '' -HostHeaderWebApplication '' -Name 'Portal' -Description 'Portal' -OwnerAlias 'SP\SP_Admin' -language 1033 -Template 'BLANKINTERNETCONTAINER#0'

Then I mapped the public IP of the SharePoint server with my external DNS. Thereafter my SharePoint site is accessible from outside as below

But the public URL was not accessible within my server farm (e.g SharePoint server, or Analysis Services Server), And I need to have a more concrete solution than host files.

Following are the steps I used

1. Log in to domain controller and navigate to DNS Manager. Right click on Forward Lookup Zones and create new












2. Create new A record to SharePoint server



3. Test the connectivity

First clear the DNS cache

  • ipconfig /flushdns


That’s all we have to do. In the same way I had to map public URLs of my analysis services as well.

Wednesday, June 29, 2016

Change the address space of a Azure virtual network containing a functional server farm

I have recently deployed a SharePoint farm in Microsoft Azure Infrastructure as a Service (IaaS). That server farm contains following servers.

  • Domain Controller with DNS
  • File Server
  • SQL Server
  • Analysis Services Server
  • SharePoint Server

Furthermore I’ve configured Point-to-Site VPN connectivity as well. Following is how the environment was structured.


Everything looks good until I received a request to move everything to a different network address space. It seems that there was an internal network range which conflicts with my address space. The only option is to move to a new virtual address space.

Following was the desired configuration.


I had few challenges to overcome

  1. Move the environment to a new address space without corrupting my servers
  2. Consume the existing Domain Controller and DNS
  3. Continue to use my SharePoint server

Luckily I got recommendations from my good friend Janaka and received a great help from Denny Cherry to find a solution. This post is written to summarize the approach I took to move my environment to a new address space.

Okay. Let’s start the migration.

Following are the steps I followed.

1. Stop and deallocate all servers in the environment.

2. In Domain Controller remove the static IP assignment


3. Add a new Address Space in Virtual Network


4. Add new Subnets in that Address Space


5. I have to execute some PowerShell commands. I need to get the names of network cards in each server prior to that


6. First we need to connect to the environment

Get-AzureRmSubscription –SubscriptionName "My Subscription" | Select-AzureRmSubscription –SubscriptionName "My Subscription"

7. Declare variables

$rgname = "TRS-Test-Res-01"
$vnetname = "TRS-Test-Net-01"
$subnetName1 = "TRS-Test-Sub-01"
$subnetName2 = "TRS-Test-Sub-02"

$adNICName = "trs-test-dc-01646"
$fsNICName = "trs-test-fs-01971"
$dbNICName = "trs-test-db-01899"
$asNICName = "trs-test-as-01350"
$spNICName = "trs-test-sp-01892"

8. Get Virtual Network and Subnets

$vnet = Get-AzureRmVirtualNetwork -ResourceGroupName $rgname -Name $vnetname
$subnet1 = Get-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $subnetName1
$subnet2 = Get-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $subnetName2

9. Migrate the first server (Domain Controller)

$nicAD = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $adNICName
$nicAD.IpConfigurations[0].Subnet = $subnet1
Set-AzureRmNetworkInterface -NetworkInterface $nicAD

I have to do some extra steps to update the DNS server (Activities from step 10 to step 13).

10.  Start the Domain Controller server

11. In Virtual Network set the custom DNS


But still it shows as the DNS server, when I checked within the domain controller


12. Execute following commands and restart the domain controller

  • ipconfig /flushdns
  • ipconfig /registerdns
  • dcdiag /fix




13. Check ipconfig /all again after the restart


Now the DNS servers are updated properly

14. Now we have to migrate other servers

#File Server
$nicFS = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $fsNICName
$nicFS.IpConfigurations[0].Subnet = $subnet1
Set-AzureRmNetworkInterface -NetworkInterface $nicFS

#SSAS Server
$nicAS = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $asNICName
$nicAS.IpConfigurations[0].Subnet = $subnet1
Set-AzureRmNetworkInterface -NetworkInterface $nicAS

#DB Server
$nicDB = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $dbNICName
$nicDB.IpConfigurations[0].Subnet = $subnet2
Set-AzureRmNetworkInterface -NetworkInterface $nicDB

#SharePoint Server
$nicSP = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $spNICName
$nicSP.IpConfigurations[0].Subnet = $subnet2
Set-AzureRmNetworkInterface -NetworkInterface $nicSP

15. Once all servers are migrated we need to restart them

16. Now we can delete Subnets from my previous environment (TRS-Test-Sub-01 and TRS-Test-Sub-02)



17. Later we can delete the Address Space of my previous environment


That’s all I had to do. Hope this helps someone .

Tuesday, May 24, 2016

Microsoft Azure resource manager portal - check the core limit using PowerShell

Recently I had to work on a new Azure tenant in resource manager portal. Unfortunately there was an issue when creating new virtual machines. It gave me an error saying that cores are not sufficient.


I needed to verify the core availability.

In Azure classic portal I can easily navigate to my subscription and check available resources like below.


Let’s try to check the same with Azure resource manager portal.


Oops. I couldn’t find any place in new portal to check the resource usage. specifically number of cores available versus utilized.

But there is a way to check that. We can use Azure PowerShell.

First you need to download Azure PowerShell module. Following are the commands we need to use.


Get-AzureRmSubscription –SubscriptionName "Pay-As-You-Go" | Select-AzureRmSubscription

Get-AzureRmVMUsage -Location "australiaeast"


Sunday, May 15, 2016

Lecture – Introduction to SharePoint at University of Colombo School of Computing (UCSC)

I did my first lecture at UCSC 12th of May 2016 as a guest lecturer. I was asked to do a lecture   for the subject, “Advanced Web Technologies”.

I did a session on SharePoint and how it complies with modern workplace trends.

Following is the presentation I used to conduct the session.

Sunday, May 1, 2016

Azure Roadshow 2016 – Microsoft Azure Notification Hub

Recently myself and Prabath did a session on “Azure Notification Hubs” in Azure RoadShow Sri Lanka event. We selected that topic because it is related to Azure mobile services and modern application development.

Notification Hubs handle end to end mobile notification including following features

  • Device registration
  • Message distribution
  • Message templating
  • Message targeting

Following is the presentation we did


Following are some pics taken from the event

1   2

3 4

5  6