Pi-hole on Ubuntu Server 18.04 within Hyper-V VM

So I wanted to use Pi-hole on my home network but making use of my server rather than adding a raspberry pi. I already had Hyper-V server installed so I created a new VM using only 1 processor and 1024mb of Ram (love how little system resources it needs). I gave it 5GB of Hard Drive space which is plenty, then I installed Ubuntu Server 18.04 from the ISO. Setup is pretty painless but before I could install Pi-hole I noticed on a few forums a few packages needed to be installed on Ubuntu first:


First was to install dialog so on Ubuntu run:

sudo apt-get install dialog


Next was to install dhcpcd5 on Ubuntu run:

sudo apt-get install dhcpcd5


Then run the Pi-hole installer:

curl -sSL https://install-pi-hole.net | bash

Run through the installation and remember the password that it gives you at the end, especially if you have installed the Web Admin Site which looks like this and provides a simple method of making changes to pi-hole:




Hyper-V 2016 Server - Add USB Hard Drive to Virtual Machine

I wanted to use an USB3 External Hard Drive to a Virtual Machine on my server which was running Windows Hyper-V 2016 Server.  From searching on the internet it seemed you needed to make the Hard Drive offline, however not much information on how to actually do this.  In the end this is my solution:-

Exit to Command Line from Hyper-V server [14]

Then enter disk management called diskpart [diskpart]:-

List the volumes [list volume]:-

Find the one that is the Hard Drive you wish to make offline.  In this case it is Toshiba Ext, Volume 4. 

So select the correct volume [select volume 4]:-

I like the make sure it is actually selected as I don't want to down my server.

So list the volumes again [list volume].  Notice the * next to Volume 4 indicating that it is selected:-

Make the disk offline [offline disk]:-

After this in Hyper-V manager you can now create a new Hard Drive selecting an actual Physical Hard Disk, in this case my Toshiba USB3 HD:-

Fix - Unable to install Dot Net 3.5 (.Net) on Windows Server 2012 R2

Tried to install Microsoft SQL Server 2012 on a Windows 2012 R2 and had the following error:-

The following error has occurred:

Error while enabling Windows feature : NetFx3, Error Code : -2146498298 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143

OK simple enough I thought, so I just used PowerShell and ran:-

Install-WindowsFeature –name NET-Framework-Core

but that got to about 68% and failed.  OK maybe it needed the media (DVD/ISO) of the original VM creation.  So again tried the following PowerShell:-

Install-WindowsFeature –name NET-Framework-Core –source Z:\Sources\SXS

but again got to about 68% and failed - very odd as never had issues installing .Net 3.5 before on a modern server.  Looking around the internet it seemed if you had any of the following KB's installed from the Windows update it was a good idea to remove first:-

  • KB2966826
  • KB2966827
  • KB2966828

But I didn't have these installed as a fairly new server build.


The fix was fairly simple.  On the Server open Group Policy and open the following:- Local Computer Policy -> Computer Configuration -> Administrative Templates -> System

Find the Setting that says:-

Specify settings for optional component installation and component repair

Click Enabled and tick the box that says:-

Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)

Click apply and OK, then back in PowerShell run:-

Install-WindowsFeature –name NET-Framework-Core

And thankfully .Net 3.5 will now be installed.

Microsoft SharePoint 2016 Prerequisites Installation on Windows Server 2012 r2

Tried to install a fresh copy of Microsoft SharePoint on Windows Server 2012 r2 and had the following prerequisite failed:-

OK so looks like we need to install a few things:-

Install Windows Identity Foundation
Open Powershell (as Administrator)
Add-WindowsFeature windows-identity-foundation


Install the Microsoft Identity Extensions

Install Microsoft Sync Framework Runtime v1.0 SP1 (x64)

Windows Server AppFabric
Download the Windows Server AppFabric exe and save it to your Server. Then run the PreRequisiteInstaller from the SharePoint 2016 ISO (CD) using the following command line (as Administrator):-
prerequisiteinstaller.exe /appFabric:[Dir where you saved the AppFabric exe]\WindowsServerAppFabricSetup_x64.exe

Note- it will do a reboot after installation.

Install Microsoft ODBC Driver 11 for SQL Server

Install Microsoft WCF Data Services 5.6 (rename this download to WcfDataServices56.exe)

Install Microsoft Information Protection and Control Client (MSIPC)

Install IIS 6 Management Compatibility component
Open PowerShell (as Administrator)
Add-WindowsFeature Web-WMI


The following maybe needed, but it was not for me.
CU 1 for AppFabric 1.1 (KB2671763):

Then try installing SharePoint 2016 again and all should be well.

Excel Automation as a Scheduled task on Windows Server 2012 R2

Migrating some Excel Automated code using C# off an old Windows 2003 Server onto Windows Server 2012 R2 and using Scheduled Tasks to run I notice it was failing.  User linked to the Scheduled Task has correct permissions and it is being run with highest privileges.  Excel installed and I can run the code manually fine as that user.  Plenty of threads about the issue but the only thing that worked was:-


Windows 2008 +

Add 2 directories:-




Windows 2012 r2

Add 2 extra directories:-




SQL Server Database Backup Failure Operating system error 665

Had a SQL Server 2005 FULL Backup failure each night for the largest database (around 45GB).  Looking at the SQL Server Logs I notice the following error:-

BackupMedium::ReportIoError: write failure on backup device 'D:\BACKUP\SERVER_DATABASE_FULL_20160103_202215.bak'. Operating system error 665(error not found).

Looking at possible solutions:-
  • Backup HD drive is heavily fragmented, but as this is a SAN then that is not really possible.
  • Drive is compressed
Checking the drive and yes it was compressed so the network guys turned this off and bingo all we managed a full nightly backup.

Windows Server Essentials Connector just hanging after entering account

Following on from my post:-

Connecting Windows 10 to Windows Server 2012 R2 Essentials

I found running the Windows Server Essentials Connector Configuration Wizard was hanging after I entered the account and password details.  No error messages appeared, just stopped working.

Looking at the connector logs:-

C:\ProgamData\Microsoft\Windows Server\Logs (ProgramData is a hidden folder but it exists on Windows 10).

I opened the most recent txt file in this case it was called ClientDeploy.txt and noticed lots of errors relating to:-


A bit strange as the browsers work.


The fix was a bit simple really, the DNS setting on the Wifi was set to Automatic and pointing to the routers IP lets say however I needed to change the DNS setting to use the IP of the server lets say  Re-running the Essentials Connector and it went straight through.  I changed the DNS setting back to be Automatic and everything works as it should.

Installing Intel Graphics driver on Windows Server 2012 R2 Essentials

Setting up a Desktop PC as a Windows Server 2012 R2 Essentials Server and not able to install the default Graphic card driver from HP.  The setup will not work either from the Intel website, but this is an old i7 processor using the onboard Intel HD 2000 graphics processors.


First you need to install the Windows Server Essentials Experience

Server Manager -> Manage (Tab) -> Add Roles and Features

Click through until "Server Roles" and then tick the "Windows Server Essentials Experience" (near the bottom)

Server might need a restart

Then download the driver direct from Intel here I am using the x64 bit driver from:-

Intel HD Graphics 2000 for 2nd Generation Intel Core Processors

Just run the setup and all should install correctly.

Getting WiFi to work on Windows Server 2012 R2 Essentials

So I setting up an old Desktop PC as a Windows 2012 R2 Essentials Server.  I wanted to use WiFi to set it up as I am not near a network port, but every time I enabled the disabled WiFi adapter it kept disabling itself again.  Even using a USB WiFi card didn't work so a little poke around and it was a simple fix to get working.


You need to install the Wireless Lan Service in Server Features.

So Run Server Manager -> Manage (Tab) -> Add Roles and Features

Click through the wizard until you get to Features Section and tick "Wireless Lan Service" (near the botttom).

Might need a restart.

OK but wait the WiFi adapter is still disabled.  Quick check in Services:-

Server Manager -> Tools (Tab) -> Services

and I noticed the WLAN AutoConfig was not started.  Start this and bingo you can now connect using WiFi.