Building SharePoint 2016 development environment – Part 16 – Installing and setting up Visual Studio


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

The last part of the 16-part series is to install and set up visual studio so you can start developing on your machine.

I’m going to use Visual Studio 2015 Community edition, this might not be suitable for you, you might have access to Visual Studio 2015 Enterprise/Professional edition. Also there is Usage agreements to the Visual Studio 2015 Community edition, which if in an organisation you might be breaking the licensing agreement.

Downloading Visual Studio Community

  1. Open a browser, and go to URL https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
  2. Click Download Community 2015 button
  3. Run or Save then run, the download file.
  4. Once the installer has started, select Custom then click Next
  5. On the Select Features screen, I didn’t need to select anything and clicked Next. However, you might want extra programming languages, maybe the common tools such as the Git for Windows extension.
  6. Click Install.
  7. When finished, you will be asked to reboot your machine. Click Restart Now.

Configuring Visual Studio

  1. After your server has rebooted, Sign in and open Visual Studio
  2. You will be presented with a screen to connect to your developer services, if you have any sign in now. It is worth looking into if you are planning on doing some Azure, as you can get some free credits by signing up to Visual Studio Dev Essentials https://www.visualstudio.com/en-us/products/free-developer-offers-vs.aspx. Either sign in, or click Not now, Maybe later.
  3. It will prepare Visual Studio for you on your machine as it is the first time it has been opened.
  4. First thing to do once open is check if there are any updates required. From the Visual Studio menu click Tools > Extensions and Updates… Update anything that needs updating.

Installing Office and SharePoint 2016 Developer Tools

After installing all your updates for Visual Studio, if you go and try to create a new project, you will find that there is no Office/SharePoint templates.

You will need to install this. Note: If you have already installed Microsoft Office Developer Tools for Visual Studio 2015 and Microsoft Office Developer Tools Preview for Visual Studio 2015, you will need to uninstall these first otherwise SharePoint 2016 projects will not show up in Visual Studio.

  1. In a browser go to the URL https://www.microsoft.com/en-us/download/details.aspx?id=51683 and click Download to download Microsoft Office Developer Tools Preview 2 for Visual Studio 2015
  2. Select 14.0.23930\enu\cba_bundle.exe. Once downloaded, run.
  3. Click Install
  4. After it has successfully installed, you can click Close
  5. Open Visual Studio 2015 (Don’t forget to run as Administrator)
  6. Click File > New > Project
  7. Under Templates > Visual C# > Office/SharePoint > SharePoint Solutions and you should see the SharePoint 2016 templates.

Getting around the cannot connect to the target site message.

If you continued from the last part to create a SharePoint project and tried to connect to SharePoint, you would have got the following message about SharePoint solutions only work with locally-installed version of SharePoint Foundation or SharePoint Server.

To get around this problem you have to add the URL’s to your host file.

  1. Open Notepad as administrator
  2. Open the file C:\Windows\System32\drivers\etc\hosts. (You will need to look at all files, not .txt files to see it)
  3. Add the following lines and then save the hosts file.
    127.0.0.1 dev.cfcode2016.com

    127.0.0.1 intranet.cfcode2016.com

  4. Now when you click the Validate button in Visual Studio – SharePoint Customization Wizard you will get a connection successful message.

Other programs to install

You might decide not to use Visual Studio 2015, and use Visual Studio Code as I’m aware some developers are now doing, mainly because it is a lot faster to run on the machine. You might also want to install Office products such as Word/Excel.

Removing old Checkpoints.

Now your machines are complete, you probably don’t have a reason to go back re-apply an old checkpoint. Therefore it make sense to clean them up. After all every time you take a checkpoint a new file is created on your host, and the difference between your original or previous checkpoint file is stored within this new file. If you take a look at where your Virtual Machine stores it’s hard drive, there will be multiple files, all quite large in size. Not including the folders, this takes up over 85GB of space on my host machine.

  1. Ensure that your Hyper V virtual machines are shut down.
  2. Here you can either delete just the CheckPoints you want, or delete the whole subtree. As I don’t need to keep any of my checkpoints, I’m going to select the top checkpoint and then click Delete Checkpoint subtree from the right pane.
  3. Click Delete on the confirmation dialog box.
  4. If you look back where you store your Virtual Machines its hard drive, it looks a lot less messy, and uses up less space. (Total over 47GB)

Thank you for reading this series, hopefully you found it useful.

Building SharePoint 2016 development environment – Part 7 – Adding AD accounts.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Creating the Accounts required

Please note that the following setup is just for a simple development environment. You should read the Microsoft SharePoint Server 2016 Prepare for Installation section.

First we need to create 9 different accounts.

SP_Farm – SharePoint Farm account

SP_Setup – SharePoint Setup Account

SP_Content – SharePoint Content account for the Content Databases

SP_Services – SharePoint account for the Shared Services within SharePoint

SP_SQL – The account to run SQL with.

SP_Search – The account used for SharePoint Search Crawler

SP_UserProfile – The account used for User Profile service

SP_SuperUser – SharePoint publishing infrastructure super user account

SP_SuperReader -SharePoint publishing infrastructure super reader account

  1. Log into the Domain Controller.
  2. In the Start Menu, type Active Directory Users and Computers. Select the application.
  3. Expand the tree in the left hand pane to see the Managed Service Accounts OU. Select the Managed Service Accounts OU.
  4. Right click on Managed Service Accounts and select New > User. Create a new user called SP_Farm. Set the Full Name and Log on name to SP_Farm. Click Next.
  5. In the password dialog screen, enter the following and click Next.
    1. Password and Confirm Password: Pa55w0rd
    2. Untick User must change password at next logon.
    3. Leave User cannot change password as unticked.
    4. Tick Password never expires
    5. Leave Account is disabled as unticked
    6. Click Next. Then Finish

Repeat the steps 1-4 for the remaining accounts (SP_Setup,
SP_Content, SP_Services, SP_SQL, SP_Search, SP_UserProfile, SP_SuperUser, SP_SuperReader, and SP_Unattended)

You could add any users here, but when creating their accounts, add them to User OU not the Managed Service Accounts

Setting up Host names (SQL2016, Intranet, Dev, HNSC, my)

  1. On your Domain controller, in the start menu, type DNS. Open the application to the DNS Manager
  2. Expand the forward lookup zones contained in the left panel.
  3. Right click on the zone cfcode2016.com and click on a New Host
    (A or AAAA)
  4. Type in the name of the record. In this case we are going to name our SQL Server SQL2016. Set the IP address as the IP address where we are installing SQL. This was configured in our previous post as 192.168.137.200. Click on Add Host.
  5. You will then get a verification dialog, and after click OK. You will see the record has been created in the right pane of the DNS manager.
  6. To Check that this is all working, open a command prompt, and type
    ipconfig -flushdns
    Then type
    ping SQL2016


    Note: If it’s unable to ping, you might have the firewall switched on for domains on your VM’s. You can turn this off. (Remember this is development machine only)

    Repeat the above steps 1-6 for Dev and Intranet, HNSC and my

Building SharePoint 2016 development environment – Part 6 – Creating SQL & SharePoint Machine.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Creating your SQL & SharePoint Machine

  1. Follow my old blog on Creating your hyper V windows Server 2012 machine from a differencing disk. Give about 16GB (16,384Mb) of memory to the machine, and only add the Internal Network connection.
  2. When you start up your new Virtual Machine based on the base disk, you will be required to enter a valid Key Code for Windows Server 2012 R2 Standard Edition. Let the sysprep process complete, answer any installation questions required and then log in.
  3. You now have Virtual Machine that we are going to use for our SQL and SharePoint.
  4. Enhanced mode of Hyper V will work after you have logged in once, and then reboot. (Believe tools install themselves in the background).

Set Static IP address

  • In the start menu, type View Network Connections and under Settings you should see a link.
  • Right click your network internal adapter and click Properties.
  • In the properties windows, select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button.
  • Update the properties form to have the following information:
    • IP Address: 192.168.137.200
    • Subnet Mask: 255.255.255.0
    • Default gateway: 192.168.137.1
    • Preferred DNS Server: 192.168.137.100

Change the name of the Machine.

  1. From the Server Manager screen. Click on Local Server.
  2. Where it says Computer Name, click the link.
  3. This will open the System Properties dialog box.
  4. Click on the Change button.
  5. Enter the name of the server. I have called mine ‘CFSP2016’
  6. Click OK.
  7. Click OK and reboot when asked.

Add the SharePoint machine to the Domain.

  1. From the Server Manager screen. Click on Local Server.
  2. Where it says Workgroup, click the link.
  3. This will open the System Properties dialog box.
  4. Click on the Change button.
  5. Click on the Domain radio button. Type in the name of your domain you gave your machine in the previous blog post. (Part 4- Installing Active Directory)
  6. Enter the name of the server. I have called mine ‘CFSP2016’
  7. Click OK.
  8. Click OK and reboot when asked.

Important from now on: When you sign in, ensure you sign in as domain\administrator not computerName\Administrator, defaults to computerName\Administrator.
To ensure that when you type administrator into the SharePoint server to run as domain admin, it doesn’t automatically think that you mean built in administrator, we are going to rename the administrator built in account.

  1. From the Start menu, type User, and select Edit local users and groups
  2. In the left hand pane, select Users.
  3. On the right hand pane, right click Administrator and select Rename
  4. Change the name to something other than Administrator. I’ve renamed mine to Admin.
  5. If you log out, and try to log in as COMPUTERNAME\Administrator it will state the password is incorrect. Change this to COMPUTERNAME\Admin then try your password. You should be able to log in.

Adding a DVD drive for ISO in Virtual Machine.

Before I can install SQL or SharePoint I need a way to install my ISO files onto my Virtual Machine. These steps will show you how to add a DVD player to your virtual machine that will allow you to read ISO files.

  1. Open up Hyper-V Manager, right click your Virtual machine that you are using for SQL & SharePoint and click settings.
  2. Within the settings window, under Hardware select SCSI controller. Then select DVD Drive, and click Add.
  3. Then ready for the next step, select Image File: and find your SQL Server 2016 Standard Edition ISO file.

Building SharePoint 2016 development environment – Part 4 – Installing Active Directory.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Creating your Domain Controller Machine

  1. First remove the Base Virtual Machine you created in the previous posts from the Hyper V manager. Select the base virtual machine and on the right hand side, under the machine name, click Delete. Don’t worry this just deletes the machine, but keeps the virtual machine disk. By deleting this from Hyper V there is no chance of accidently starting it.
  2. Next follow my old blog on Creating your hyper V windows Server 2012 machine from a differencing disk. Give about 2GB of memory to the machine, use generation 2, and call your differencing disk AD2012R2, and the same with the machine name.
  3. When you start up your new Virtual Machine based on the base disk, you will be required to enter a valid Key Code for Windows Server 2012 R2 Standard Edition. Let the sysprep process complete, answer any installation questions required and then log in.
  4. You now have Virtual Machine that we are going to use for a Domain Controller.
  5. You should get Enhanced mode back after login in and rebooting once. I believe hyper V installing tools in the background the first time you login.

Adding the Internal Network connection

You can do the following steps with the Virtual Machine switched on or off.

  1. On the Hyper-V manager screen, right click your newly created Virtual Machine that we are using for Active Directory, and click Settings.
  2. On the Settings page add a new Network Adapter and click Add
  3. Select Internal as the Virtual Switch and then click OK.

Giving the Virtual Machine a Static External IP Address.

First thing you will need to do is Set the IP of the machine to Static address.

  1. Log on to the Virtual Machine, as administrator | Pa55w0rd.
  2. From Start Menu type CMD and open the command prompt.
  3. Type ipconfig /all
  4. Here you should see what the current dynamic IP address is for your virtual machine.
  5. Back in the start menu, type View Network Connections and under Settings you should see a link.
  6. Right click your network External adapter and click Properties.
  7. In the properties windows, select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button.
  8. Update the properties form to match your current machine configuration.
  9. Click OK. Click Close. After a moment your adapter will reset itself and you should have internet access again.

Giving the Virtual Machine a Static Internal IP Address

  • In the start menu, type View Network Connections and under Settings you should see a link.
  • Right click your network internal adapter and click Properties.
  • In the properties windows, select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button.
  • Update the properties form to have the following information:
    • IP Address: 192.168.137.100
    • Subnet Mask: 255.255.255.0
    • Default gateway: 192.168.137.1
    • Preferred DNS Server: 192.168.137.100

Configure the Host internal IP settings.

  • Back on your Host machine. Open the run command and type ncpa.cpl
  • Right click your Internal adapter, and click properties.
  • In the properties windows, select Internet Protocol Version 4 (TCP/IPv4) and then click the Properties button.
  • Update the properties form to have the following information:
    • IP Address: 192.168.137.1
    • Subnet Mask: 255.255.255.0
    • Default gateway: 192.168.137.1
    • Preferred DNS Server: 192.168.137.100

Change the name of the Machine.

  1. From the Server Manager screen. Click on Local Server.
  2. Where it says Computer Name, click the link.
  3. This will open the System Properties dialog box.
  4. Click on the Change button.
  5. Enter the name of the server. I have called mine ‘CFAD’
  6. Click OK.
  7. Click OK and reboot when asked.

Setting up the Domain Controller.

  • Login to the CFAD virtual machine using administrator | Pa55w0rd
  • On the Server Manager > Dashboard, click (2) Add roles and features
    • On the Add Roles and Feature Wizard you will be present with Before you begin. Click Next
    • On Installation Type select Role-Based or Feature-based installation
    • On Select destination server accept the default of Select a Server from the server pool with CFAD selected. Click Next
    • On the Server Roles, select “Active Directory Domain Services
    • Accept the Additional features required, by clicking Add Features.
    • Keep press Next until you reach the Confirmation screen. Then click Install.
      Once it is installed click Close on the Wizard page.
  • Back on the Server Manager Dashboard you will see the item AD DS added to the Roles and Server Groups. Click on the title of AD DS. Note it will say at the top of the screen Configuration required for Active Directory Domain Services at CFAD. At the far right of this message click More…
  • The more link will bring up the All Servers Task Detail dialog. It will show an action of Promote this server to a domain. Click on that link.
  • On the Deployment Configuration screen select Add a New Forest.
    • I named my root domain cfcode2016.com. Click Next.
    • The next screen seems to processes for some time. I thought the screen was locked/froze but after a minute or so it was fine.
    • Give a password of Pa55w0rd to the Directory Services Restore Mode (DSRM) password. Click Next
    • Ignore the DNS Options warning. Click Next.
    • It then check the NetBIOS domain name. (This too takes a little time to show.) Click Next.
    • Next it will specify the Path locations of the AD DS database, log files, and SYSVOL. Accept the defaults and click Next.
    • The next page allows you to review your selection, and export to a Windows PowerShell script if you wish to automate additional installations. Click Next.
    • Before the actual install of AD, all prerequisites are checked. If all prerequisite checks are passed then click install. You can ignore warnings.
    • The machine will restart automatically after the promotion of the server to a DC has finished.
    • Once the server has rebooted and you have log on to it, if you click on Server Manager | Tools, you will notice that the following items have been installed:
      • Active Directory Administrative Center
      • Active Directory Domains and Trust
      • Active Directory Module for Windows PowerShell
      • Active Directory Sites and Services
      • Active Directory Users and Computers
      • ADSI Edit
      • DNS
      • Group Policy Management

  • Now is a good time to shut down the machine and perform a checkpoint in hyper V manager. That way if you don’t get something right in the next post, you can always revert back your machine back to the end of this post. (Wish I followed my own advice sometimes).

Building SharePoint 2016 development environment – Part 3 – Building a base disk to use for differencing disk.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Building a base disk to use for differencing disk.

Why am I using differencing disks? To build my dev environment, I need a minimum of 2 servers. An Active Directory, and a SQL & SharePoint server. You could possibly use 3 servers and separate the SQL and SharePoint out, or you might expand out SharePoint and not just use the stand alone configuration. You might add other servers in the future (You will need a beefy machine for this.) By building a base disk it will save you time in the future, Windows, the basic set up of features, updates, programs will already be on the machine, and you just need to add the extra programs you require for the given server.

What needs to go on here?

You need to put on this machine everything that you would probably want on all your virtual machines. Your list might be different to mine.

  • Windows Server 2012 R2 Standard Edition 64 bit.
  • Firefox
  • Chrome – with any extensions
  • Fiddler

Creating your Virtual Machine.

  1. Open up Hyper-V Manager
  2. Under Actions, click on New and select Virtual Machine. Click Next.
  3. Name you Virtual Machine, and your choice if you wish to store the virtual machine in a different location. (Preferably on a SSD drive)
  4. On the Specify Generation page, select Generation 2.
  5. Assign some memory, at this stage 6GB (6144mb) will be enough for installing everything. Click Next.
  6. Configure the Network to point to the External connection and click Next.
  7. Name your Virtual Hard Disk. Change the location if you wish, and I recommend creating a 400GB hard disk. (If you have room). We will split the disk inside the virtual machine into 100GB and 300GB for C and D drive. Click Next.
  8. Install Options, you can select Install an Operating system from a Boot CD/DVD-ROM and in my case I have selected the Windows Server 2012 R2 with Update (x64) Image file.

Install Windows 2012 R2 Server Standard Edition.

Inside you Hyper V manager you should now see your Virtual Machine. In my case it’s called CFBase. By right clicking on the machine you can connect to it. A window will open. You can then click the Start Button.

  1. Configure the language. Click Next
  2. Then Click Install Now.
  3. Insert your product key. Click Next.
  4. Select Windows Server 2012 R2 Standard (Server with a GUI) and then click Next.
  5. Tick I accept the license terms. Click Next.
  6. Select the Custom: Install Windows only (advanced) option.
  7. In the Where do you want to install Windows. Click New Create a new space of 102400MB. This will create a 100GB space. Accept the message that says Windows might create additional partitions for system files. You should now see Drive 0 Partition 1: Recovery, Drive 0 Partition 2, Drive 0 Partition 3, Drive 0 Partition 4 and Drive 0 Unallocated Space. Select the last one and click New, then Apply. This will set up your drive space. Select Drive 0 Partition 4 (100GB) then click Next, and Windows 2012 R2 will start installing on the 100GB drive.
  8. Once it has finished installing itself, it will ask you for a password for the Administrator. I use Pa55w0rd. Click Finish.
  9. Now you can log in. To perform Ctrl + Alt + Del in a Hyper V Machine. Press Ctrl + Alt + End.

Configuring Windows 2012 R2

  1. Once you have logged back in again the Server Manager appears. On the left hand menu, click on Local Server. This will bring up all the properties for this machine.
  2. Disable the Windows Firewall, by clicking on the Windows Firewall Public: On link.
  3. Then click the Advanced Settings on the left of the screen.
  4. On the right panel of Windows Firewall with Advanced Security, click Properties.
  5. For each Tab Profile (Domain, Private, Public) switch the Firewall state to Off. Then Click OK.
  6. Back on the Server Manager screen click the On link for IE Enchanced Security Configuration. Then turn this off for Administrators and Users. Click OK.
  7. Go back to the Start menu. Type UAC, and select settings from the right hand side. Click on Change User Account Control Settings.
  8. On the User Account Control Settings, move the slider down to the bottom. This will prevent the screen keep prompting you when an administrative task needs to be made. Click OK.
  9. Back in the Server Manager properties window for the server. Enable Remote Desktop. Click the Disabled link. Then select Allow remote connections to this computer. Click OK.
  10. Back in the Server Manager properties window for the server, Click on Windows Update Not Configured link. This will open the Windows Update Dialog.
  11. Click Let me choose my settings. Then on Choose your Windows Update settings, I always have Download updates but let me choose whether to install them. And then I tick Recommended updates. Click OK.
  12. Your server will now check for updates. Install anything that is outstanding.
    Note: You might have to repeat the check for Windows Update process a couple of times.

Disable the Shutdown Event tracker

  1. Open the start menu and type gpedit.msc. Click on the program to open it.
  2. In Group Policy Editor, navigate to Computer Configuration\Administrative Templates\System, open the Display Shutdown Event Tracker policy, and set it to Disabled.

    Now when you shut down you shouldn’t see the Shutdown tracker appear.

Enabling the Desktop Experience

  1. Open up the Server Manager.
  2. On the right of the screen click Mange > Add Roles and Features
  3. Click Next.
  4. Ensure Role-based or Feature-based installation is selected. Click Next.
  5. On Select destination server click Next.
  6. On Select server roles click Next.
  7. On Select features. Expand User Interfaces and infrastructure (Installed) and tick Desktop Experience. Add the addition features that it requires. Click Next.
  8. Click Install.
  9. Restart the Server.

Getting the Sound to work within your Virtual Machine.

With Hyper V in Windows 10, there is an enhanced session.

By running in enhanced mode, hovering over the speaker Icon in the task bar, it will state that Audio Service isn’t running. Right click it, and select sounds. A dialog will then pop up and ask if you want the audio service to be enabled. Click Yes.

The speaker icon will no longer have a red cross over it. And you should be able to hear sound through your VM if you enter the machine by using enhanced mode, or via a remote desktop connection.

Formatting the second drive.

If you take a look in explorer, you will only see a C:\ drive which should have 149GB. However we created a 400GB disk, and spilt it into 150GB and 250GB. We need to format the second disk.

  1. In Server Manager, in the top right corner, select Tools > Computer Management.
  2. In the Computer Management window, in the left hand pane, under storage, select Disk Management
  3. First thing I will do, is change the CD-ROM drive from D: to E: just so I can have a C and D drive as hard disk.
    1. Right click CD-ROM 0 at the bottom of the screen. Select Change Drive Letter and Path.
    2. On the dialog, click the Change button.
    3. Assign the new drive letter as E. Click OK.
    4. Click Yes to the warning message.
  4. Now we will format the 250GB drive.
    1. At the bottom, on Disk 0 row, at the end you should see 250.00 GB RAW. Right click this and select Format
    2. Put a name is the Volume label if you wish. I’m going to delete mine, and then leave everything as it is. Click OK.
    3. Assuming you have clicked on the correct area, click OK to the Format dialog warning.
    4. After the formatting has completed, right click on the area again, and this time, select Change Drive Letter and Paths.
    5. On the dialog, click Add.
    6. Ensure that D is assigned. Then click OK.
    7. Your explorer window will now show a C, D and E drive.

Extra Stuff to install.

Now you can install any additional software that you want to be available on every virtual machine you build. Below is a list of items I’m installing, you might have more.

Setting up the menu

If you currently look at your menu you will notice that everything is everywhere. You can click and drag tiles and position them in more logical sections. By moving them between other sections you can create new sections.

By clicking on the bottom right of the menu screen there is a minus icon. By clicking this, you will zoom out. Then by right clicking a section you can then name it.

I organised my menu to look like below screen shot. You might prefer a different layout, or have other programs to add.

Sysprep the machine.

As I have already written a blog on Sysprepping a machine while keeping the Menu the same after sysprep follow the following blog. Windows 8 and Windows Server 2012 Start Screen is Reset when Sysprep

Once you have completed the above post of Sysprep while keeping the Start menu. Do not turn on your Virtual Machine again. If you do it will start the Sysprep process. At this point, go to where the base hard drive is for the Virtual Machine, and set it to Read Only.

Building SharePoint 2016 development environment – Part 2 – Setting up and configuring Host Computer using Hyper V.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Setting up and Configuring Host Computer using Hyper V.

From comparing from my SharePoint 2013 blog post, I’ve noticed I haven’t actually upgraded my PC in 4 years. I still have an i7 3770K, 32GB ram. I have larger SSD hard drives than before. My host PC is running Windows 10, and I have activated the feature to include Hyper V (Same for Windows 10).

Configuring the Network adapters

I will be creating just two Virtual Machines. The Domain Controller machine and the SQL & SharePoint machine. I want the Virtual Machines to have internet access, but to be on their own network IP range. The following instructions will show you my set up.

  • Open Hyper V Manager, and on the right hand side of the screen, click Virtual Switch Manager.
  • Create an external adapter (if it’s not already there) and point the network to your external network connection of your host machine.
  • Then create an Internal adapter. Point that to the Internal network.
  • Click OK. To save your Virtual Switches information.
  • On your host machine, open up your Network Connections. In run command, type npca.cpl
  • When the Network connections open, you should see your two newly created Network switches.
  • Right Click on the External adapter and click Properties.
  • Select the Sharing tab, and then tick to ‘Allow other network users to connect through this computer’s Internet connection.’ Then select your Internal adapter and click OK on the properties.
  • The External Adapter should now say Shared

We will be doing further configuration within the Virtual Machines network in a later post, but for now we are done.

Building SharePoint 2016 development environment – Part 1 – Introduction


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

This will be an interesting learning curve for me too, to see how much has changed and how many issues I will encounter compared to the 2013 version.

The plan is to build 2 Virtual Machines.

A Domain Controller

The domain controller running on Windows Server 2012 R2. I will be calling the domain cfcode2016.com, This server will host Active Directory, DNS, and Certificate Authority. It will run on 2GB of RAM.

A SharePoint Machine

The SharePoint machine will be running using the SharePoint mini-role configuration which should only be used for development and testing. Never production. The plan is to configure SSL certificates, a development and intranet site using Host Named Site Collections (HNSC). Services that will be running on this machine will be Managed Metadata Service, User Profile, Search, Workflows, and Apps. I will be using the latest version of SQL. (SQL 2016) There is no reason why you can’t use SQL 2014, just ensure you install .NET framework 3.5 on the server before you install SQL. There will be an error messages if you try!

Unlike my 2013 blog posts this SharePoint farm will not be using Kerberos. Mainly because I couldn’t get it working, and secondly for a development environment it’s not really needed unless you are doing code that requires Kerberos. My SharePoint virtual machine will be running on 16GB of RAM.

I will be installing Visual Studio 2015 directly onto the SharePoint server.

I’m lucky enough to have MSDN license keys to build out my farm, if you don’t have MSDN, these products all have 180-day trial licenses available and you could use them instead. https://www.microsoft.com/en-GB/evalcenter/

Good luck, it took me over a week to test and write these blogs, just to ensure everything works correctly. I had bumps along the way and I’m sure you might too (Hyper V Checkpoint come in handy).

Building Your SharePoint 2013 development machine on Windows Server 2012 – Part 10 – Setting Up Visual Studio


UPDATE: SharePoint 2016 development machine

I am doing a collection of blog posts, you can access the other parts of this post below.

Setting up Visual Studio

The last part of this 10 part series is to set up visual studio so you can start developing on your machine.

  1. From the Start menu, type Visual Studio 2012 and open the application.
  2. As it is the first time Visual studio 2012 has opened, you will be prompted with choose default environment settings dialog. Choose your preference. Mine is Visual C# Development Settings. For the local help documentation, I’m selected None so that I don’t fill up my virtual machine with help files that I can obtain by looking online. Click Start Visual Studio.
  3. As soon as I loaded up my environment, I got a message saying that there are Visual Studio 2012 updates from the system tray of my Server. Either click the icon in the system tray, or select from the Visual Studio menu Tools > Extensions and Updates… Update anything that needs updating.
  4. Close Visual Studio 2012.

Install Office and SharePoint 2013 Developer Tools

  1. From the Start Menu, type Microsoft Web Platform Installer. Open the Application.
  2. Once loaded, in the Search box type SharePoint press Enter.
  3. Select Add for Microsoft Office Developer Tools for Visual Studio 2012 – Preview 2
  4. Then Click Install.
  5. Click I Accept on the Prerequisties page.
  6. Once complete, you will have the Office and SharePoint tools installed for Visual Studio.

Building Your SharePoint 2013 development machine on Windows Server 2012 – Part 9 – Configuring Workflow


UPDATE: SharePoint 2016 development machine

I am doing a collection of blog posts, you can access the other parts of this post below.

Install SharePoint Designer 2013

I have noticed in my blog I haven’t yet told you to install SharePoint Designer 2013. There is a good reason to install it now, because I can use it to prove if you have correctly configured Workflow Manger with SharePoint. SharePoint Designer 2013 is a free tool from Microsoft.

  1. Download SharePoint Designer 2013 32bit from the Microsoft site http://www.microsoft.com/en-GB/download/details.aspx?id=35491
  2. Once downloaded run the file sharepointdesigner_32bit.exe.
  3. Accept the License terms and click Continue
  4. Click Install Now.
  5. Once installed, I’d recommend performing a Windows Update. From the Start Menu type Windows Update, open up the application and run any updates required. Reboot if necessary.

Check to see Workflow settings in SharePoint Designer.

  1. From the start menu, type SharePoint Designer and open the application.
  2. Once SharePoint Designer has opened, click Open Site.
  3. Type the URL http://dev.cannonfodder.local click Open.
  4. If prompted, enter your credentials User: Cannonfodder\Administrator Password:Pa55w0rd.
  5. From the Navigation menu, select Workflows
     
  6. On the ribbon menu, select List Workflow > Documents.

     
  7. In the Create List Workflow dialog, at the bottom you will see a dropdown box for Choose the platform to build your workflow on. Only SharePoint 2010 will be listed.  
  8. Close down SharePoint Designer.

Configuring Workflow Manager

First we need to create a Workflow account.

  1. In the Start Menu, type Active Directory Users and Computers. Select the application.
  2. Expand the tree in the left hand pane to see the Users OU. Select the Users OU.
  3. Right Click on User and select New > User. Create a new user called SP_Workflow. Set the Full Name and Log on name to SP_Worflow. Click Next.
  4. In the password dialog screen, enter the following and click Next.
    1. Password and Confirm Password as: Pa55w0rd
    2. Untick User must change password at next logon.
    3. Leave User cannot change password as unticked.
    4. Tick Password never expires
    5. Leave Account is disabled as unticked.
    6. Click Next. Then click Finish.

Setting up SQL with the correct Security Accounts.

  1. From the start menu, type SQL Server Management Studio and open up the application
  2. In SQL Server click Connect. (This should be to SQL2012 database instance).
  3. In the left hand menu expand Security. Right click Logins. And select New Login…
  4. In the Login – New dialog box, click the Search button.
  5. Type SP_Workflow in the Enter the object name to select, and click Check Names. This will resolve the name. Click OK.
  6. In the left hand panel select Server Roles.
  7. Tick both securityadmin and dbcreator then click OK.
  8. Close down SQL Server Management Studio

Giving SP_Workflow administrative rights.

  1. From the start menu, type Active Directory Users and Computers and open up the application.
  2. In the left hand panel, expand Active Directory users and Computer > cannonfodder.local > Builtin.
  3. In the right hand panel, right click Administrators and select Properties.
  4. In the members tab, click Add.
  5. Type SP_Workflow in the Enter the object names to select box, click Check Names, then click OK.
  6. Click OK to the Administrators Properties dialog box, and close Active Directory Users and Computers.

Installing Workflow Manager

  1. Go to the URL http://www.microsoft.com/web/downloads/platform.aspx and download the latest Microsoft Web Platform Installer.
  2. Once downloaded run the file WebPlatformInstaller_amd64_en-US.msi
  3. Accept the license terms and click Install.
  4. Once installed, you can open from the start menu by typing Web Platform.
  5. Once loaded, type Workflow in the top right search box and press Enter. Find Workflow Manager 1.0 and click Install.
  6. On the Prequisites page, click I Accept.
  7. Once installer has complete, Click Continue and then Finish to start the configuration process.

Configuring Workflow Manager

  1. From the Start menu, type Workflow Manager Configuration and open the application.
  2. On the Welcome Page, click Configure Workflow Manager with Default Settings (Recommended).
  3. On the New Farm Configuration Page set the SQL server Instance to SQL2012
  4. Set the User ID to SP_Workflow@cannonfodder.local and the password to Pa55w0rd
  5. Tick the Allow Workflow management over HTTP on this computer.
  6. Click the Test Connection button to ensure your credentials work.
  7. In the Certificate Generation Key and Confirm Certificate Generation key enter Pa55w0rd into both textboxes.
  8. At the bottom right of the dialog box click the right arrow button to proceed to next screen.
  9. A summary will appear. You can either click the tick icon at the bottom right to continue, or Get PowerShell Commands to obtain the powershell scripts to run later. In this instance, click the tick icon.
    (Please note the screen shot was taken during my first attempted, I used the wrong RunAs Account)
  10. Once the process has completed everything should have been configured.

Connecting Workflow to SharePoint 2013.

  1. From the start menu, type Workflow manager powershell and open the application.
  2. Type
     Get-WFFarm | ft HttpPort 
  3. Take note of this port (12291), as this is the port number that you will connect SharePoint 2013 to the Workflow Manager 1.0 farm.
  4. Close Workflow Manager PowerShell.
  5. From the start menu, type SharePoint 2013 Management Shell and open the application.
  6. Type
     Register-SPWorkflowService –SPSite "http://intranet.cannonfodder.local" –WorkflowHostUri "http://cannonfodderser:12291" –AllowOAuthHttp 
  7. Once you get the command prompt appearing again your SharePoint 2013 farm in now connected to the Workflow Manager 1.0 farm.

Check to see Workflow settings are working in SharePoint Designer.

  1. From the start menu, type SharePoint Designer and open the application.
  2. Once SharePoint Designer has opened, click Open Site.
  3. Type the URL http://dev.cannonfodder.local click Open.
  4. If prompted, enter your credentials User: Cannonfodder\Administrator Password:Pa55w0rd
  5. From the Navigation menu, select Workflows
  6. On the ribbon menu, select List Workflow > Documents.
  7. In the Create List Workflow dialog, at the bottom you will see a dropdown box for Choose the platform to build your workflow on. Both SharePoint 2010 and SharePoint 2013 should be listed if the Workflow is set up correctly.
  8. Close down SharePoint Designer.

Building Your SharePoint 2013 development machine on Windows Server 2012 – Part 8 – Configuring My Sites and User Profiles


UPDATE: SharePoint 2016 development machine

I am doing a collection of blog posts, you can access the other parts of this post below.

MySites

We are now going to create a new Web Application for our My Site site. However we are not going to create a HNSC like we did for dev.cannonfodder.local, here we are going to create path-based site collections. From the Microsoft Technet article (which is for SP2010, so it might be different now, but couldn’t see anything saying something different) that there is a guideline for mysite sites.

  • You must use the self-service site creation feature that is included with SharePoint Server to create path-based site collections. MySite should be created as a path-based site or a custom solution should be provided.

Creating a Web Application for MySites

  1. From the start menu, type Central Administration and open the site.
  2. Select Application Management > Manage Web Applications.
  3. In the ribbon click the New icon.
  4. In the Create New Web Application dialog leave Create a new IIS web site selected and type the name as SharePoint My Site Host, leave the port as 80, and put my.cannonfodder.local in the host header.
  5. For simplicity in finding the Web Applications, I put the path on a different drive. D:\VirtualDirectory\MySite
  6. Under Claims Authentication Types set the Integrated Windows Authentication to Negotiate (Kerberos)
  7. Under Application Pool, select Use existing application pool and select SPContent App Pool
  8. Under Database Name and Authentication set the Database Name to SP_DEV_MySites.
  9. Scroll down to the bottom and click OK.
  10. Once the Web Application of My Site Host has been setup, click the link to Create
    Site Collection

Creating a Site Collection for MySites.

  1. On the Create Site Collection put the Title as My Site Host
  2. Set the URL as /
  3. The Template section as My Site Host, which can be found in the Enterprise tab
  4. Set the Primary Site Collection Administrator as cannonfodder\administrator

  5. Scroll down to the bottom and click OK.

Configure the Web Application to Host My Sites.

  1. After you have created your site collection, you should be returned to the Manage Web Application page. Select SharePoint My Site Host by clicking on it. This will highlight the line and items in the ribbon will become available to you.
  2. In the ribbon click the button Managed Paths

  3. In the Define Managed Paths dialog tick Sites. Then click the link Delete selected paths.
  4. Now add a new path called personal and make it Wildcard inclusion.
  5. Add another new path called my and make it Explicit inclusion. Then click OK.

  6. With SharePoint My Site Host still selected click the icon on the ribbon called Self-Service Site Creation.

  7. On the Self-Service Site Creation page, under Site Collections, select the on radio button. Click OK.

Add my.cannonfodder.local to DNS

  1. From the start menu, type DNS and open the application.
  2. Expand Forward Lookup Zones,
    right click cannonfodder.local and select New Host (A or AAAA)…
  3. For Name put my. Put the IP Address as 192.168.139.99, click Add Host. Click OK to the DNS message box stating the host record wad successfully created. Close DNS Manager.

Create Kerberos SPN for my.cannonfodder.local

  1. From the start menu, type cmd and open Command Prompt.
  2. Type setspn –S HTTP/my.cannonfodder.local cannonfodder\SP_Content
  3. While here also flush dns by typing ipconfig /flushdns
  4. Close Command Prompt window.

Configuring the User Profile Service Application My Site settings.

  1. In Central Administration left hand menu, select Application Management.
  2. Under Service Applications select Manage Service Applications.
  3. Find the User Profile Service Application in the list and click on it.

  4. Under the My Site Settings section click the Setup My Sites link.
  5. On the My Site Settings page, set the My Site Host to http://my.cannonfodder.local
  6. Under the heading Personal Site Location set the value to personal. Now click OK.

Configuring SharePoint User Profile Service Application with Active Directory.

There is a new way to import users into the user profile from Active Directory in SharePoint 2013. It is called Active Directory Import. It is a faster than the SharePoint 2010 way of using the FIM approach. Spencer Harbar has written a good blog about it here.

  1. From the start menu, type Central Administration and open.
  2. Under Application Management click Manage Service Applications.
  3. Find the User Profile Service Application and click the link.
  4. Under Synchronization, click Configure Synchronization Settings.
  5. On the Configure Synchronization Settings page, under Synchronization select Use SharePoint Active Directory Import and click OK.
  6. Back on the User Profile Service Application page, under Synchronization, select Configure Synchronization Connections.
  7. On the Configure Synchronization page, select Create New Connection.
  8. Put the following details in the Add New Synchronization Connection page.
    1. Connection Name: Cannonfodder AD
    2. Type: Active Directory import
    3. Connection Settings:
      1. Fully Qualified Domain Name: cannonfodder.local
      2. Authentication Provider Type: Windows Authentication
      3. Account Name: cannonfodder\administrator
      4. Password: Pa55w0rd
      5. Confirm Password: Pa55w0rd
    4. Under Containers click Populate Containers.
    5. After it loads, expand CANNONFODDER and then tick Users. Click OK.
    6. You will now be returned to the Synchronization Connection Page. You will see your new connection display.
  9. Repeat Steps 2 + 3 to navigate back to User Profile Service Application.
  10. Take note that on the right hand side of the screen under Profiles it states that there are 2 User Profiles.
  11. Under Synchronization, click Start Profile Synchronization.
  12. Select Start Full Synchronization and click OK.
  13. Refresh the Manage Profile Service: User Profile Service Application page, and you should see more User Profiles.