All posts by albajock1816

Enable SID History for Active Directory Forest Trusts

The Scenario

I am the System Administrator for a company Myretoun Inc which has the domain myretoun.local. Myretoun Inc have just purchased a rival company Dumyat Ltd. Their domain is dumyat.local. I have been tasked with migrating all Dumyat users over to the Myretoun domain.

Having created the Forest Trust between myretoun.local and dumyat.local I’ve started migrating users from myretoun.local to dumyat.local using Microsoft’s Active Directory Migration Tool (ADMT). As part of the migration process I have migrated SID History along with the users and the groups they are members of.

The problem

Now the Dumyat users are members of myretoun.local they need to be able to access shares that still reside on servers on the dumyat.local domain. I need to be able accomplish this using the existing dumyat.local domain security groups and thus the sidHistory attribute of the migrated user and groups.

The Solution

There are two NETDOM commands needed to be run, one on each side of the Forest Trust.

Disable SID Filtering

By default Windows filters (blocks) the sidHistory attribute from traversing the trust from myretoun.local to dumyat.local. To allow it to traverse the trust you must disable SID Filtering from the the domain where the users have the sidHistory attribute, which in this case is myretoun.local

On the myretoun.local domain open a command prompt as a user who is a member of Enterprise Admins group and enter the following command:

Netdom trust myretoun.local /D:dumyat.local /quarantine:Yes /userD:myretoun\enterpriseadminaccount /passwordD:*

by using the /passwordD:* you will be prompted to enter your password to run the command.

Enable SID History

All the previous Quarantine:Yes command does is allow the sidHistory attribute to be passed across the trust, but until SID History is enabled on the other (dumyat.local) domain it cannot be used to grant access to resources. To allow this you must enable SID History, again using the NETDOM command.

On the dumyat.local domain open a command prompt as a user who is a member of Enterprise Admins group and run the following command:

netdom trust dumyat.local /D:myretoun.local /enablesidhistory /userD: dumyat\enterpriseadminaccount /passwordD:*

Once these two commands have been run, allow sufficient time for the changes to be replication throughout your Active Directory topology before you test access with a myretoun.local user accessing dumyat.local resources.


Disclaimer: provided “AS IS” with no warranties and confer no rights


Microsoft Virtual Machine Converter: Hyper-V 2016 VM Could Not Locate Integration Services Installation Disk Image

The Scenario

I have used Microsoft Virtual Machine Converter 3.1 to convert a VMware VM running Windows Server

The Problem

The conversion completes but produces an error right at the end when it tries to install Hyper-V Integration Services on the guest OS:

Could not locate Integration Services installation disk image

The older Wndows Server OS is looking for the C:\windows\system32\vmguest.iso file to mount and install but it is no longer included in Hyper-V 2016 – with 2016 guest VMs get Integration Services updates directly from Windows Update.

The Solution

The solution is to copy the vmguest.iso file from an existing Hyper-V 2012 R2 installation to the 2016 Hyper-V server. Then mount this ISO to the DVD Drive of the guest VM. Then in the OS of the VM run the installer.


Disclaimer: provided “AS IS” with no warranties and confer no rights


The Scenario

I have just created an Active Directory Forest Trust between my domain (DomainA.local) and the acquired domain (DomainB.local)

The Problem

I need to be to confirm that DNS on my domain is able to source the Domain Controllers on the trusted domain using SRV records.

The Solution

Use NSLOOKUP to check if the DNS servers used by the local server can locate the domain controllers on the trusted forest using the SRV records.

Open a Command Prompt and type the following 3 lines:
set type=all


Disclaimer: provided “AS IS” with no warranties and confer no rights

Desired State Configuration – A very basic intro

I’ve seen this topic before when reviewing the 70-410 exam books, though for that exam very little is mentioned or indeed required. So until now I’ve given it scant notice. However, having read more about it I can see it will continue to have a growing use in the years ahead, as my requirement to provision multiple standardised servers grows. DSC really looks like it can replace the need for storage-heavy VM templates and multiple GPOs and can quickly deploy standardised servers and maintain the initial settings in the event they are changed by well-meaning, but meddling System Administrators.

As I have only just dipped my toe into the DSC ocean, this post is really as much for my benefit as anyone eases (though I’m always glad to see you of course). It’s just a basic step-through to create a MOF file and apply that to the target. I don’t mention any of the underlying concepts and terminology because there’s a plethora of information out there on Technet and beyond.

Task: I need to ensure a new directory is created on my domain controller (CIV-DC1)

Create the Configuration file:

Configuration AccountingDir {

Import-DscResource –ModuleName ‘PSDesiredStateConfiguration’

Node CIV-DC1 {
#create a new directory in the C drive called accounting

File Accounting { 
Type = “Directory”
Ensure = “Present”
DestinationPath = “C:\Accounting” }

} #Node-complete

} #configuration-complete

#run this to create the MOF file
#the name of the configuration file
AccountingDir -OutputPath c:\temp

#run this to apply the MOF file to the target
Start-DscConfiguration -path C:\temp -Wait -Verbose -Force

NB: The image below will be used during the next section, I used the PowerShell ISE:


NB: Please note line 3, when I did not have this I got the following error:


Step 1: Load the Configuration Function Into Memory

Select the Configuration text and run this in ISE

Step 2: Generate the MOF file

Highlight the command (the name of the Configuration and specify a location where therMOF file will be stored) and run this in ISE, you should get the following output:


Step 3: Apply the MOF settings to the target

Highlight the Start-DscConfiguration line, which includes the location of the MOF file (you don’t stipulate the actual MOF file) and run in ISE. The target for the MOF file is stipulated in the first lines of the MOF file so PowerShell and LCM know what the target is. If it is successfully applied you will see the following:


Visually checking on CIV-DC1 shows the new directory:


You can also run a test to confirm if the settings in the MOF file are still active/applied on the target using the Test-DscConfiguration command:



Disclaimer: provided “AS IS” with no warranties and confer no rights

Wifi Security key is incorrect (when it’s not!) – Windows 10 & KB4053579

The Scenario

My Windows 10 Professional (build 1607) has recently installed two updates; KB4049411 and KB4053579

The Problem

After these two updates were installed and the computer rebooted I could not get my computer to connect to my wifi, it kept failing with the error “The security key is incorrect”.

I knew the key was correct because I was able to access my router from another laptop and confirm the password I was entering was correct. I even tried using the WPS auto-configuration but that didn’t work either.

The Solution

I decided to uninstall both those updates as that was the only change my , starting with KB4053579. After uninstalling this one, and without a reboot, I tried connecting to my wifi, this time it worked without any issue. I didn’t uninstall KB4049411.

I don’t usually like uninstalling updates given they’re meant to secure my device or make it more stable, nor would I normally advocate anyone else doing the same but I really didn’t have a choice here. Please consider the security implications before doing so yourself. I will attempt to reinstall it in a few days once I get my work finished and will post an update here afterwards to let you know the outcome.


Disclaimer: provided “AS IS” with no warranties and confer no rights

PS Tip: PowerShell Catches

In this example I want to check if a list of users samAccountNames returns a list of matching displaynames. In the event that the user is not found I don’t want a system error displayed, I want a custom error message. This is done using a Try & Catch statement, the Try element being the test and the Catch element what I want the custom error to be.

$users = get-content C:\team-members.txt
Foreach ($user in $users) {
try {
(get-aduser $user).Name
catch {“$user not found in AD!” #this text will replace the system error output

Office/Excel Tip: Add cell value to text string, including inverted commas

I have a spreadsheet with the Active Directory current_ObjectID attribute in column H and the new_ObjectID I want to apply in column J.

The powershell script to make the change I want is this:

Rename-ADObject –Identity “<current_objectGUID>” –NewName “<new_objectGUID>”

To autopopulate the current and new ObjectID values from their respective columns and keep the inverted commas around the ObjectID values I needed to type the following:

=”Rename-ADObject –Identity “””&H3&””” -NewName “””&J3&””””

PS Tip: Is Hyper-Threading enabled on my computer

Open an elevated PS session and enter the following:

get-wmiobject -Class win32_processor | ft -Property NumberOfCores, NumberOfLogicalProcessors -auto

If Hyper-threading is enabled you’ll have twice the number of logical processors that you have of physical cores. In my case Hyper-threading is enabled due to the 4-8 ratio.



Disclaimer: provided “AS IS” with no warranties and confer no rights

Hyper-V: Provide Internet Access for VMs with Internal/Private vSwitches

The Scenario

I have VMs configured to use either an Internal virtual switch or a Private virtual switch

The Problem

As neither an Internal or Private virtual switch are bound to a physical NIC they have no way of getting internet connectivity. This for me is a real problem as I want to connect to the internet to download updates and other files from these VMs.

The Solution

I’ve tested this solution on Hyper-V running on Windows Server 2008 R2 Enterprise, 2012 R2 Standard and Windows 10 Professional. This solution assumes the following:

  1. You have already created a standard Private and/or Internal virtual switch
  2. You have a physical NIC on the Hyper-V host that is already connected to a network that has Internet access.

Step 1: Open the services on the Hyper-V host and select the “Routing and Remote Access” service, enable it and set it to automatically run.

Check also that the “Internet Connection Sharing (ICS)” is set to automatic and is started.

Step 2: Open the Network and Sharing Center (NCS) and open the properties of the physical NIC on the Hyper-V host that is connected a network that has Internet connectivity. Select the Share tab and enable the “Allow other network users to connect through this computer’s Internet connection” option.

In the drop down menu select the virtual switch Private/Internal NIC which will use this ICS connection. In the NCS a new icon will appear called “Incoming Connections“.

Step 3: Staying in the Network and Sharing Center open the properties of the virtual switch Private/Internal NIC and ensure it has a static IP address. In my tests it was automatically assigned, but you can assign any address as you require – make a note of this as it is needed in Step 4.

Step 4: For the VMs to use this ICS, login to them and open their Network and Sharing Center and configure the NIC to have a static IP address in the same subnet. In my example I gave my VM the address Finally set the default gateway for the VM to be the IP address of the address of the virtual switch Private/Internal NIC, in my case

In my example I also added the google DNS server to the DNS settings in the VM, but configure this as fits your requirements.

Step 5: Test you have Internet connectivity. In my example no further configuration was required, I had Internet access immediately

Important: As this client has got direct Internet access it is advisable to install an anti-virus solution and ensure it is fully patched.


Disclaimer: provided “AS IS” with no warranties and confer no rights

AVG 17.5.x firewall blocking Hyper-V VM connections

The Scenario

I have a Windows 10 (v1607) Pro instance with AVG Internet Security 17.5 installed, including the AVG Firewall component.

I have the Hyper-V feature enabled and an Internal Hyper-V vSwitch named “hv-int” which all my VMs use. This vSwitch uses the APIPA range.


The Problem

I cannot locally connect to any of my VMs via the Connect option in Hyper-V Manager, the connection just times out after several attempts. When I disable the AVG Firewall it works fine, but I don’t want to permanently disable my Firewall for obvious reasons.

The Solution

By default all local network connections, including Hyper-V vSwitches are classified as Public. By changing this to the more trusted Private option the local connections are permitted:

Step 1: Open the AVG management console


Step 2:  Click the Internet Security option:



Step 3:  Click the top-right Menu > Settings option – this lists the AVG components installed.


Step 4: Click the left-menu Components option and in the main pane scroll down to the Firewall option. Click Customize.


Step 5: Click the left-menu Network profiles option and in the main pane locate your Hyper-V vSwitch. Change the Profile type from Public to Private. Click OK to confirm the changes and exit out of the AVG console.


Now try launching a local connection to the VM via the Hyper-V Manager, in my case it now worked.


Disclaimer: provided “AS IS” with no warranties and confer no rights