Create a Windows Demo Environment: Create Other Machines

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

With the domain controller finished, I would then create all of the other machines required for the demo environment.

There are four steps I followed when creating the domain controller that I would replicate for each of the other servers.

Firstly, I’d replicate the VM HDD with Windows Server installed and run sysprep.

Second, configure the ethernet; I typically give the mailserver an IP ending in 10 and the SQL server one ending in 20, the terminal server with one ending 90, with others created as required.

Thirdly, I rename the server to have names matching their purpose.

For demo environments, I usually isolate them so all services are internal; to this end I don’t use MS Office 365 for email, but instead install and use hMailServer.

Create a Windows Demo Environment: Promote Server to Domain Controller

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

With the domain controller machine renamed, that machine can now be promoted to be the domain controller. I used to do this through the front-end settings applets, but in 2019 I worked out some PowerShell wich could be used instead.

There are two steps in promoting a machine to be a domain controller.

  1. Install the Active Directory Domain Services Windows Feature.
  2. Install the Active Directory forest.

To install the Active Directory Domain Services Windows Feature the following PowerShell command can be used:

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

To install the AD forest, there are two elements which need to be defined:

  1. Domain name (such as UK.azurecurve)
  2. NETBIOS (such as UK)

The PowerShell command using these two elements is:

Install-ADDSForest -DomainName {domain name} -DomainNetbiosName {netbios}

Create a Windows Demo Environment: Rename Domain Controller Server

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

When Windows is installed, the machine is given a random name, which doesnisn;t all that easy to work with. To rename the PC, you need to open the About settings window by either holding down the Windows key and pressing the Break key or by launching Windows Explorer, right clicking on This Computer and clicking Properties.

Click the Rename this PC (advanced) link under the Related settings:

Continue reading “Create a Windows Demo Environment: Rename Domain Controller Server”

Create a Windows Demo Environment: Configure Ethernet on Domain Controller Server

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

When creating demo environments I always give them their own range of IP addresses in the internal Hyper-V network. This is so that I can make sure that each machine is able to see all of the others without any issues. The first machine I configure is always the which I will be using as the domain controller.

On the most recent demo environment I created, I used the IP address of 40.1.1.1; I usually use something well outside the range of IP address on my main network or ones used on the Internet so as to avoid any potential conflicts.

To configure a static IP address, right click on the network icon in the system tray and select Open Network & Internet settings and, in the Settings window which opens, click Change adapter settings under Advanced network settings:

Network and internet settings window

Continue reading “Create a Windows Demo Environment: Configure Ethernet on Domain Controller Server”

Create a Windows Demo Environment: Replicate VM and Run sysprep

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

In the last post, I installed Windows Server; if I require more than one installation of Windows I would simply copy the HDD of the VM, create a new VM in Hyper-V and then run sysprep against all of the VMs, including the first.

I covered sysprep over 10 years ago and the process has not changed at all, so Im just going to link back to that post.

Create a Windows Demo Environment: Install Windows Server 2022

WindowsThis article is part of the Create a Windows Demo Environment series where I am installing and configuring a small Windows domain for use with demo installs of software.

The first part of the installation is to install Windows Server; at the moment that would be Windows Server 2022.

Select the Language to install and the related settings; the most recent test system I installed was for Installing Microsoft Dynamics 365 Business Central 2022 Wave 1 On-premise Demo for which I used US English, but usually use UK English:

Microsoft Server Operating System Setup: Select language and regional settings

Continue reading “Create a Windows Demo Environment: Install Windows Server 2022”

Windows Start Menu Location

WindowsI recently needed to manually add an entry to the Windows start menu and was surprised at how hard it was to find the start menu location.

There are actually two locations; one for all users and one for a specific user.

The all users location is in %ProgramData%\Microsoft\Windows\Start Menu\Programs and the user specific one in %UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs.

Restart Windows Service Using Commands

WindowsA client has recently been having an issue with a process which appears to starts having problems after it has been running for a few days. While the application was investigated, they wanted to restart the service periodically restarted automatically.

The below Windows command script was created to stop the named service, wait 30 seconds and then start the service again:

@echo off

net stop {service name}

timeout 30

net start {service name}

exit

Change the highlighted section to the name of the service to be stopped and started.

Enable the Windows Distributed Transaction Coordinator

Windows ServerOne of the line of business applications used by a few clients performs updates to both it’s own database and also the Microsoft Dynamics GP database. It does this using code in SQL stored procedures which use transaction boundaries.

As the updates are between SQL servers, it does this using BEGIN DISTRIBUTED TRANSACTION rather than the usual BEGIN TRANSACTION; updates of this sort are, as stated in the name, distributed and required the Distributed Transaction Coordinator (DTC) Windows component to be enabled, which it is not by default, on both servers.

However, enabling DTC is straightforward and quick to do. Launch Component Services and expand the nodes (Computers » My Computer » Distributed Transaction Coordinator) and right click on Local DTC; select Properties:

Component Services window

Continue reading “Enable the Windows Distributed Transaction Coordinator”

What NETBIOS Is The Machine On?

Windows ServerI was recently doing some work for a client installing some software and realised that I didn’t know what their NETBIOS was and the application didn’t have a lookup option for the service account so I needed to type the domain and username directly. The IT people I was working with were in a meeting and not going to be available for a while so I couldn’t ask.

I did some checking around and found a command which can be run to get the NETBIOS:

nbtstat -n

There may be other ways of doing this and I’d be interested in hearing about them.