• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • Blog
  • Shop
  • Forums
  • Subscribe
  • About
  • Contact
MENUMENU
  • Blog Home
  • AWS, Azure, Cloud
  • Backend (Server-Side)
  • Frontend (Client-Side)
  • SharePoint
  • Tools & Resources
    • CM/IN Ruler
    • URL Decoder
    • Text Hasher
  • Linux & Servers
  • Zero Code Tech
  • WordPress
  • Musings
  • More
    Categories
    • Cloud
    • Server-Side
    • Front-End
    • SharePoint
    • Tools
    • Linux
    • Zero Code
    • WordPress
    • Musings
Home » SharePoint » Setting up a SharePoint 2016 dev farm in Azure – Part 4: SharePoint 2016 Installation

Setting up a SharePoint 2016 dev farm in Azure – Part 4: SharePoint 2016 Installation

January 26, 2018 by Ehi Kioya 16 Comments

Detailed instructions/procedure for setting up a SharePoint 2016 development or test farm. This is a multi-part article. The following posts are part of this series:

  • Part 1: Introduction
  • Part 2: Domain Controller
  • Part 3: SQL Server
  • This page – Part 4: SharePoint 2016 Installation

In this article, we will perform the actual SharePoint 2016 installation. This will be a virtual machine (spVM) in the virtual network we created in Part 2 of this series. We will make spVM a member of the Windows Server AD domain, and then create a new SharePoint farm.

The values of some variables used in the Azure PowerShell commands below have been discussed in the preceding article (Part 2 of this series). Please refer to it as required.

Like before, we will start by creating an availability set…

Create a managed availability set for SharePoint virtual machines

Run the following commands at the Azure PowerShell prompt or in the PowerShell Integrated Script Environment (ISE) on your local computer. Supply your own values for subscription name and resource group name.

# Sign in to Azure (you will be prompted for credentials)
Login-AzureRmAccount
 
# Enter your own Azure subscription name
$subscrName="Visual Studio Enterprise with MSDN (MPN)"
 
# Enter your own unique resource group name
$rgName="SP2016RGroup"
 
# Set the subscription and location
Get-AzureRmSubscription -SubscriptionName $subscrName | Select-AzureRmSubscription
$locName=(Get-AzureRmResourceGroup -Name $rgName).Location
 
# Create an availability set for SharePoint virtual machines
New-AzureRMAvailabilitySet -Name spAvailabilitySet -ResourceGroupName $rgName -Location $locName -sku aligned -PlatformFaultDomainCount 2 -PlatformUpdateDomainCount 2

A new availability set named spAvailabilitySet will be added. You can view it in the resources list on your Azure portal.

Choose a domain name label for the SharePoint VM

At this point, you will need to decide on a globally unique name to supply to the $dnsName variable in the next block of commands. This will be a public domain name label for the SharePoint server.

The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name (FQDN) associated with the public IP address that we will create using the New-AzureRMPublicIpAddress command. We could technically omit the -DomainNameLabel flag. But by specifying it, an “A” DNS record is created for the public IP in the Microsoft Azure DNS system.

Notice that we did not need to specify a domain name label when creating the domain controller (adVM) and the SQL Server VM (sqlVM). This is because for those machines, we were not setting up websites or accessing them directly over the public internet. For the SharePoint VM (spVM), we want to be able to log in to our SharePoint websites from anywhere as long as the SharePoint farm is up and running. We make this possible in the alternate access mappings section below (using the domain name label we chose now).

The domain name label cannot be a sub-domain because the dot (“.”) character is not allowed. It can contain only lowercase letters, numbers and hyphens. The first character must be a letter. The last character must be a letter or number.

If you’re not sure if your chosen domain name label is unique, you can find one directly on the Azure portal and then come back here an plug in the value into the variable. To choose a domain name label from the Azure portal, pretend you want to create a new IP address. Like this:

  • Press New on the dashboard
  • In the search box that appears, type “ip” (no quotes) and select Public IP address
    Create New IP Address Azure Portal
  • Press the Create button. A new form opens that allows you to specify parameters for the new public IP address you want to create.
  • Ignore all the options except for the DNS name label box. Use that box to find a unique and valid domain name label (when you enter a valid value, a green check mark will be displayed).
    Choose a DNS Name Label Azure
  • Note the available label. Now you can cancel or close out of Azure portal without actually creating the public IP address.
  • Supply the domain name label you chose to the $dnsName variable in the next section.

SharePoint 2016 Installation: Create the VM (spVM)

Run these commands in the same PowerShell session where you created the availability set:

$dnsName="spehikioya"
$vmName="spVM"
$vmSize="Standard_D3_V2"
$vm=New-AzureRMVMConfig -VMName $vmName -VMSize $vmSize
$pip=New-AzureRMPublicIpAddress -Name ($vmName + "-PIP") -ResourceGroupName $rgName -DomainNameLabel $dnsName -Location $locName -AllocationMethod Dynamic
$vnet=Get-AzureRMVirtualNetwork -Name "SP2016Vnet" -ResourceGroupName $rgName
$nic=New-AzureRMNetworkInterface -Name ($vmName + "-NIC") -ResourceGroupName $rgName -Location $locName -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip.Id -PrivateIpAddress "10.0.0.6"
$avSet=Get-AzureRMAvailabilitySet -Name spAvailabilitySet -ResourceGroupName $rgName 
$vm=New-AzureRMVMConfig -VMName $vmName -VMSize $vmSize -AvailabilitySetId $avSet.Id
$vm=Set-AzureRmVMOSDisk -VM $vm -Name ($vmName +"-OS") -DiskSizeInGB 128 -CreateOption FromImage -StorageAccountType "StandardLRS"
$cred=Get-Credential -Message "Type the name and password of the local administrator account."
$vm=Set-AzureRMVMOperatingSystem -VM $vm -Windows -ComputerName $vmName -Credential $cred -ProvisionVMAgent -EnableAutoUpdate
$vm=Set-AzureRMVMSourceImage -VM $vm -PublisherName "MicrosoftSharePoint" -Offer "MicrosoftSharePointServer" -Skus "2016" -Version "latest"
$vm=Add-AzureRMVMNetworkInterface -VM $vm -Id $nic.Id
New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm

If you followed the steps in the previous articles, you may get the following warning when you run the New-AzureRMVM command:

WARNING: Since the VM is created using premium storage, existing standard storage account, visuasp2016advm012215490, is used for boot diagnostics.

Ignore it.

Your SharePoint 2016 virtual machine will be created from Microsoft’s SharePoint OS image. Now, we need to configure it.

Join the SharePoint VM to the Windows Server AD domain

Once the virtual machine has been built, use these steps to connect to it using the local administrator account credentials which you set with the Get-Credential command in the above block.

In the Azure portal, go to Resource Groups, select the name of your resource group, select spVM and press Connect. A file named spVM.rdp will be downloaded.

Run the downloaded file. If prompted, click Connect.

In Windows Security, enter the user name as spVM\<ADM_NAME>
Where, ADM_NAME is the user name you chose when you ran the Get-Credential command above.

Enter the password and click OK. If prompted, click Yes.

The sp.ehikioya.com domain was created in Part 2 of this series. Make sure that the domain controller VM is running. Now, join spVM to the Windows Server AD domain with these commands. Run them from an administrator-level Windows PowerShell command prompt on the SharePoint VM.

Add-Computer -DomainName "sp.ehikioya.com"
Restart-Computer

After running the Add-Computer command, you will be required to supply domain account credentials. Use the SP\<ADM_NAME> account and password.

After spVM restarts, reconnect to it using the domain account (SP\<ADM_NAME>).

SharePoint 2016 Installation: Create a new SharePoint farm

Make sure all three VMs (adVM, sqlVM, and spVM) are up and running.

  1. From the Start screen on spVM, type SharePoint, and then click SharePoint 2016 Products Configuration Wizard.
    Launch SharePoint 2016 Products Configuration Wizard
  2. On the Welcome to SharePoint Products page, click Next.
    SharePoint 2016 Products Configuration Wizard
  3. A SharePoint Products Configuration Wizard dialog appears, warning that some services (like IIS and the SharePoint Timer Service) may be reset. Click Yes.
    SharePoint 2016 Products Configuration Wizard Dialog
  4. On the Connect to a server farm page, select Create a new server farm, and then click Next.
    SharePoint 2016 Products Configuration Wizard - Connect to a Server Farm
  5. On the Specify Configuration Database Settings page:
    – In Database server, type sqlVM.
    – In Username, type SP\sp_farm_db. We created the sp_farm_db user account in Part 2 of this series.
    – In Password, type the sp_farm_db account password.
    SharePoint 2016 Products Configuration Wizard - Config Database Settings
  6. Click Next.
  7. On the Specify Farm Security Settings page, type a passphrase twice. Record the passphrase and store it in a secure location for future reference. Click Next.
    SharePoint 2016 Products Configuration Wizard - Farm Security Settings
  8. On the Specify Server Role page, in Single-Server Farm, select Single-Server Farm, and then click Next.
    SharePoint 2016 Products Configuration Wizard - Specify Server Role
  9. On the Configure SharePoint Central Administration Web Application page, leave the default settings and click Next.
    SharePoint 2016 Products Configuration Wizard - Configure Central Admin Web App
  10. The Completing the SharePoint Products Configuration Wizard page appears with a summary of your settings. Click Next.
    Completing the SharePoint Products Configuration Wizard
  11. The Configuring SharePoint Products page appears. Wait until the configuration process completes.
    Configuring SharePoint Products
  12. On the Configuration Successful page, click Finish. The new central admin website starts.
    SharePoint Initial Configuration Successful
  13. On the Help Make SharePoint Better page, choose if you want to participate in the Customer Experience Improvement Program, and then click OK.
    Help Make SharePoint Better Dialog SP 2016
  14. On the Welcome page, click Start the Wizard.
    Central Admin Initial Farm Configuration SharePoint 2016
  15. On the Service Applications and Services page, in Service Account, click Use existing managed account. Leave the default settings for Service Applications and Services and then click Next.
    Central Admin Initial Farm Configuration SharePoint 2016 - Service Applications and Services
  16. It may take a few minutes to display the next page.
    SP 2016 Initial Farm Config
  17. On the Create Site Collection page, type your site collection name (in my case EhiKioya) in Title, and then click OK.
    SP 2016 Initial Farm Config - Create Site Collection
  18. On the This completes the Farm Configuration Wizard page, click Finish.
    This completes the Farm Configuration Wizard
  19. The SharePoint Central Administration web page displays.
    SharePoint 2016 Central Admin
  20. Open a new tab in Internet Explorer, type http://spvm/ in the Address bar, and then press Enter. You should see the default EhiKioya team site.
    Default Team Site SharePoint 2016

Your SharePoint 2016 development farm is ready. You may also want to configure an alternate access mapping to allow Internet users to access your SharePoint sites using the DNS name attached to the public IP address of the SharePoint VM.

Alternate access mapping for SharePoint 2016

  1. Run the following commands from the Azure PowerShell prompt on your local computer (NOT on spVM):
    # Run this only if you already terminated your previous session
    Login-AzureRmAccount
    
    # Enter your own resource group name
    $rgName="SP2016RGroup"
    
    Write-Host (Get-AzureRMPublicIpaddress -Name "spVM-PIP" -ResourceGroup $rgName).DnsSettings.Fqdn
  2. Take note of the returned DNS name. It should look something like spehikioya.eastus.cloudapp.azure.com
  3. On spVM, go to SharePoint Central Admin.
  4. In the System Settings section, click Configure alternate access mappings.
  5. On the Alternate Access Mappings page, click Edit Public URLs.
    SharePoint 2016 Alternate Access Mappings
  6. On the Edit Public Zone URLs page, click the link next to Alternate Access Mapping Collection, and then click Change Alternate Access Mapping Collection.
    Edit Public Zone Urls SharePoint 2016
  7. In Select An Alternate Access Mapping Collection, click SharePoint – 80.
    Select an Alternate Access Mapping Collection
  8. On the Edit Public Zone URLs page, in Internet, type http://<the DNS name you got above> (in my case spehikioya.eastus.cloudapp.azure.com). Click Save.
    SharePoint 2016 Alternate Access Mapping Setting

Now, when users visit http://spehikioya.eastus.cloudapp.azure.com from the public internet, they should be able to access the default SharePoint website as long as they have correct credentials.

This concludes our installation and configuration of our SharePoint 2016 development farm.

Stop and start the virtual machines in the farm

Azure virtual machines incur an ongoing cost when they are running. To help minimize the cost of your SharePoint Server 2016 dev/test environment, use these commands to stop the virtual machines:

$rgName="SP2016RGroup"
Stop-AzureRMVM -Name spVM -ResourceGroupName $rgName -Force
Stop-AzureRMVM -Name sqlVM -ResourceGroupName $rgName -Force
Stop-AzureRMVM -Name adVM -ResourceGroupName $rgName -Force

To start them again, use these commands:

$rgName="SP2016RGroup"
Start-AzureRMVM -Name adVM -ResourceGroupName $rgName
Start-AzureRMVM -Name sqlVM -ResourceGroupName $rgName
Start-AzureRMVM -Name spVM -ResourceGroupName $rgName

You may want to note the order used when stopping at starting the VMs. adVM being the domain controller, should always started first and stopped last. The reverse is the case for spVM. spVM depends on sqlVM’s availability.

Found this article valuable? Want to show your appreciation? Here are some options:

  1. Spread the word! Use these buttons to share this link on your favorite social media sites.
  2. Help me share this on . . .

    • Facebook
    • Twitter
    • LinkedIn
    • Reddit
    • Tumblr
    • Pinterest
    • Pocket
    • Telegram
    • WhatsApp
    • Skype
  3. Sign up to join my audience and receive email notifications when I publish new content.
  4. Contribute by adding a comment using the comments section below.
  5. Follow me on Twitter, LinkedIn, and Facebook.

Other Articles You May Like:

Filed Under: AWS, Azure, Cloud, Cloud Computing, SharePoint Tagged With: Azure, Cloud Computing, PowerShell, SharePoint

About Ehi Kioya

I am a Toronto-based Solutions Architect and Lead Software Developer of an outsourced team.

I run this technology blog, as well as this consumer products shop.

You can read more about me here, and connect with me via Twitter, LinkedIn, and Facebook.

If you want to collaborate or talk to me privately, send me an email using this form. But please note that I don't answer questions or provide support via email.

To share your thoughts or get help with any of my posts, drop a comment at the appropriate link.

Reader Interactions

Comments

  1. Howard Bash says

    July 5, 2018 at 2:58 pm

    Great article! I have most of the VMs setup as per the article, but the last step (isn’t it always) is failing.

    When I remote in to spVM and run the SharePoint configuration wizard, it doesn’t find sqlVM. I tried to ping it from spVM and it doesn’t see it either. And, even pinging it when I remote in the sqlVM, the ping fails.

    Any thoughts on this would be greatly appreciated.

    Thanks,
    Howard

    Reply
    • Ehi Kioya says

      July 5, 2018 at 3:25 pm

      Hi Howard,

      Great connecting with you on LinkedIn and nice to know you’re finding my article useful.

      As per your issue, you may have missed the step to add the sqlVM to the domain. Try checking that. Are you able to RDP into sqlVM using the domain account SP\<ADM_NAME>?

      Reply
      • Howard Bash says

        July 5, 2018 at 3:51 pm

        Yes.

        I’m remoted in right now using SP\<admin name>

        And the local server in Server Manager is still showing sp.bashco.com

        Reply
        • Ehi Kioya says

          July 5, 2018 at 4:21 pm

          Just to confirm, you have 3 servers: adVM, sqlVM, and spVM right?

          And you’re able to RDP into all three using SP\<ADM_NAME>?

          Reply
          • Howard Bash says

            July 5, 2018 at 4:39 pm

            Yes.

            I appreciate your help on this. Thanks!

            I’ll double check. I connected to the sqlVM using SP. I’ll try the other two now.

          • Howard Bash says

            July 5, 2018 at 4:46 pm

            I got in to all three VMs using SP\<admin name>

            All three show local server in Server Manager as sp.bashco.com

          • Howard Bash says

            July 5, 2018 at 5:05 pm

            Hi. I have to break for a bit. Have to let dog out and dinner stuff. I’ll be back in a few hours and see if you have left me any other places to check.

            Thank you so much for your help!

          • Ehi Kioya says

            July 5, 2018 at 5:45 pm

            If you used the exact same commands in my articles, I don’t see why this should happen. Couple of things you may want to check:
            – Go to Azure portal and look through the network settings for each of your machines. Security groups/firewall especially. To confirm that nothing is blocking access.
            – Turn off all 3 machines and restart them in this order… adVM, then sqlVM, then spVM. I found that the order often matters.

          • Howard Bash says

            July 5, 2018 at 8:10 pm

            Hi.

            Well, not sure why, perhaps I hadn’t let each VM start in the correct order, but it is now running the SharePoint setup.

            Great!!! Thanks!!!

            I’ll let you know how it goes.

          • Ehi Kioya says

            July 5, 2018 at 8:12 pm

            Awesome. Cheers!

          • Howard Bash says

            July 5, 2018 at 8:13 pm

            Slow on the install… running “step 3” for some time.

            Thank you sir!

          • Howard Bash says

            July 5, 2018 at 8:55 pm

            All is working. I even added the alternate access mapping and can get site collection from outside the VM.

            Quick, question: I would like to add a couple of test users with different rights. Can you send me a powershell snippet for this?

            Thanks!!!

  2. websplee says

    March 25, 2019 at 4:38 pm

    Very helpful series of articles. I have managed to set up SharePoint and now playing with it.

    Just a few pointers. I got errors on the “Standard_LRS” so I updated that to “StandardSSD_LRS”.

    Then since I was using the free trial (I concluded), I only had a maximum of 4 vCPUs. So I had to change the VM sizes. I gave one core to the ad, another to sql and the other two to the SharePoint.

    Thanks a lot.

    Reply
    • Ehi Kioya says

      March 25, 2019 at 5:08 pm

      Great to know you found the series useful. Looks like Microsoft recently changed the “Standard_LRS” to “StandardSSD_LRS”. Someone else mentioned the same problem in a comment on one of the other articles in the series.

      I will soon be doing a SharePoint 2019 version of this series. Watch out for that too since it will have 100% up to date information.

      Reply
  3. Myat says

    May 5, 2019 at 6:12 am

    Hi Ehi Kioya,

    Thank you very much for this very helpful article.
    I was able to follow all the steps without any issue except that i’m getting “Cannot connect to database master at SQL server at sqlVM. The database might not exist, or the current user does not have permission to connect to it” error when I add sp\sp_farm_db during SP DB configuration wizard. Sorry this is my first time trying to set up a Sharepoint on VM. I’m not very clear on the joining of sp_farm_db username to sqlVM and spVM.
    It’d be great if you can help to point out where could i have done wrong.

    Thank You!

    Reply
    • Myat says

      May 5, 2019 at 7:19 am

      Hi Ehi Kioya,

      I was able to continue after I create new AD account and use that instead.

      Thank You.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

425,996
Followers
Follow
30,000
Connections
Connect
15,215
Page Fans
Like

FROM   THE   SHOP

  • Virtual Reality Treadmill

    KATVR Kat Mini Virtual Reality Treadmill Crouch
    Rate this product:

    Gaming doesn’t have to be sedentary anymore! This Virtual Reality Treadmill helps you enjoy highly immersive and physically demanding game play. It translates your body movements into game movements. Pure fun. Great exercise.

    Price not available Check it out
  • Recently   Popular   Posts   &   Pages
  • Actual Size Online Ruler Actual Size Online Ruler
    I created this page to measure your screen resolution and produce an online ruler of actual size. It's powered with JavaScript and HTML5.
  • Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library
    This article explains how to bypass the single user remote desktop connection restriction on Windows 10 by using the RDP wrapper library.
  • WordPress Password Hash Generator WordPress Password Hash Generator
    With this WordPress Password Hash Generator, you can convert a password to its hash, and then set a new password directly in the database.
  • How To Shrink Amazon EBS Volumes (Root Or Non-Root) How To Shrink Amazon EBS Volumes (Root Or Non-Root)
    In this article, I describe a technique to shrink Amazon EBS volumes. This is very useful if you ever mistakenly over-allocate your EBS.
  • Round Robin DNS: How to Assign Multiple IP Addresses to One Domain Round Robin DNS: How to Assign Multiple IP Addresses to One Domain
    This article explains round robin DNS, load balancers, and how you set up round robin settings on your DNS server to handle high traffic.

FROM   BLOG   READERS…

  • Jesse Alama on Sorting Date And Time In XSLNice! It is indeed frustrating at times to work just with XSLT 1.0. Even if one has XSLT 2.0 or 3.0 available, one might have to use this kind of solu…
  • Jazlyn on How To Update Yoast SEO Fields ProgrammaticallyI’m done with SEO plugins. I converted to this platform with an AI assistant, I think it's called INK for All. Anyone know this? http://bit.ly/2XUjrhu
  • Chinoms on No More Like-Gating with Facebook Popups on Your SiteI've been waiting for Facebook to do this. Glad they finally did it.
  • Alan Bombria on Forcefully Clear Jobs from the Print Queue or SpoolerMy batch file: net stop spooler del /F /Q %systemroot%System32spoolPRINTERS* net start spooler
  • Santi on Backup Website/Folders With Dropbox On Ubuntu ServerNote you have the definitions switched on top: "If it says x86_64 then download the 32-bit version..." Feel free to correct and delete my comment.
  • Boaz Ziniman on Speed Up WordPress With Amazon S3 And Cloudfront (Part 1)This is a good direction that can been improved even more. 1. There is a plugin for WP that stores all your content in S3 natively from WP with no add…
  • Hafiz Aziz on Setting Up A SharePoint Development MachineThanks Ehi. Your posts are second to none. I love how well you write and make what seems complex really easy to understand. I've just bookmarked this…
  • Blog
  • Shop
  • Forums
  • Subscribe
  • About
  • Contact

© 2019   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy