Category Archives: Microsoft

WSUS – Installing WSUS Server On Windows 2016 Core

WSUS – Installing WSUS Server On Windows 2016 Core

Introduction

This article provides details of how to install the Windows Update Services (WSUS) Role on a Microsoft Windows 2016 Core Server.

This installation was performed on a server with a basic 2016 Core installation which was renamed, network settings configured, and joined to a Domain. A second hard disk (D:) was also added to hold the WSUS Content and a folder named WSUS.Content was created.

WSUS was also installed to just use the default database although I may move it to my SQL server at some point.

Installing The WSUS Role

    • Logon to the console as an Administrative account
    • Enter Powershell by executing powershell at the command prompt
    • To install the Role and it’s management tools execute Install-WindowsFeature -Name UpdateServices -IncludeManagementTools in the Powershell session.
    • Exit from Powershell and at the command prompt change to the C:\Program Files\Update Services\Tools folder
    • Execute the command wsusutil.exe postinstall CONTENT_DIR=D:\WSUS.Content to perform the post installation piece for WSUS

WSUS is now installed on the server and ready for configuration. I used a server with the WSUS Management Console already installed to connect to the new server and go through the configuration steps. If you want to perform it all through Powershell on the Core Server itself then there is an excellent article on www.xenappblog.com which goes through it here.

WSUS – Migrate WSUS Database On Windows 2012 From Internal Database To SQL 2012

WSUS – Migrate WSUS Database On Windows 2012 From Internal Database To SQL 2012

Introduction

This article provides the steps required to migrate the WSUS Database from a Windows Internal Database to SQL 2012.

The process of moving the WSUS Database from a Windows Internal Database to an SQL 2012 server consist of the following :-

  • Stop the IIS Admin and Update Services Services
  • Prepare and detach the WSUS Database
  • Copy the WSUS Database to the SQL Server
  • Attach The WSUS Database In SQL 2012
  • Add Logins to the SQL Server
  • Modifying WSUS to connect to the SQL Server
  • Start the IIS Admin and Update Services Services
  • Confirm WSUS connectivity to the SQL Server
  • Uninstalling the Windows Internal Database

For the purposes of this article the SQL 2012 Server is running on the same server as the WSUS which are both running on a Windows 2012 Core Services installation.  The SQL 2012 Management Studio is running on a seperate Windows 2012 server.

Stop The IIS Admin And Update Services Services

The first step is to stop the IIS Admin and Update Services Services on the WSUS Server by performing the following steps :-

  • At the command prompt execute the following to stop the IIS Admin Service

net stop “IISAdmin”

  • At the command prompt execute the following to stop the Update Services Service

net stop “UpdateServices”

Prepare And Detach The WSUS Database

The next step of the process is to prepare the WSUS database and then detach it from the Windows Internal Database by performing the following steps :-

  • At the command prompt execute the following to connect to the Windows Internal Database

sqlcmd -S \\.\pipe\MICROSOFT##WID\tsql\query

  • The prompt will change to 1> when you are connected to the Windows Internal Database
  • At the 1> prompt execute the following connect to the master database

use master

  • The prompt will change to 2> when you are connected to the master database
  • At the 2> prompt execute the following commands to prepare the WSUS database

alter database SUSDB set single_user with rollback immediate

go

  • At the 2> prompt execute the following commands to detach the WSUS database

sp_detach_db ‘SUSDB’

go

  • Execute exit twice to disconnect from the Windows Internal Database

Copy The WSUS Database To The SQL Server

The next step is to copy the detached WSUS Database to the SQL Server by performing the following steps :-

  • In Windows Explorer navigate to the following directory on the server

c:\windows\WID\Data

  • Copy the two files SUSDB.mdf and SUSDB_log.ldf files to the SQL Server

Attach The WSUS Database To The SQL Server

The next step is to attach the copied WSUS Database to the SQL Server by performing the following steps :-

  • Open the SQL Management Studio and connect to the SQL Server
  • Expand the Server if necessary, Right Click on Databases, and then select Attach
  • Click on Add, navigate to the directory on the SQL Server where you copied the SUSDB.mdf and SUSDB_log.ldf files
  • Select the SUSDB.mdf file and then click on OK

Add Logins To The SQL Server

The next step is to add the logins required for the WSUS Database to the SQL Server by performing the following steps :-

  • Expand the Security branch, right click on Logins, and then select New Login
  • When prompted enter NT AUTHORITY\NETWORK SERVICE for theLogin Name
  • Click on User Mapping and confirm that the user has the dbo Default Schema granted on the SUSDB Database
  • Click on OK to create the login
  • Right click on Logins, and then select New Login
  • When prompted enter {Server Name}\WSUS Administrators for the Login Name

E.G. WSUSServer\WSUS Administrators

  • Click on User Mapping and confirm that the WSUS Administrators Group is granted access to the SUSDB Database
  • Click on OK to create the login.

Modify WSUS To Connect To The SQL Server

The next step is to modify WSUS to connect to the SQL Server by performing the following steps :-

  • Edit the Registry on the WSUS Server
  • Navigate to the Registry Key below :-

HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup

  • Change the SqlServerName Value to the name of the SQL Server
  • Change the SqlInstanceIsRemote Value to 0

If the SqlInstanceIsRemote Value does not exist create it as a DWORD value

N.B. Setting it to 0 is used for if SQL is running on the same server, if you are moving it to a remote SQL Server change it to 1

  • Change the wYukonInstalled Value to 0

If the wYukonInstalled Value does not exist create it as a DWORD value

  • Exit the registry

Start The IIS Admin And Update Services Services

The next step is to stop the IIS Admin and Update Services Services on the WSUS Server by performing the following steps :-

  • At the command prompt execute the following to stop the IIS Admin Service

net start “IISAdmin”

  • At the command prompt execute the following to stop the Update Services Service

net start “UpdateServices”

Confirm WSUS Connectivity To The SQL Server

The next step is to confirm that WSUS is connecting to the SQL Server by performing the following steps :-

  • Open the Windows Server Update Services console
  • Confirm that WSUS is connected to the SQL Server and displaying the correct information

Uninstall The Windows Internal Database

The final step is to uninstall the Windows Internal Database by performing the following steps :-

  • Open Powershell
  • Execute the two commands below to uninstall the Windows Internal Database

uninstall-windowsfeature UpdataServices-WidDB

uninstall-windowsfeature Windows-Internal-Database

  • Once the Windows Internal Database features have been uninstalled Reboot the server

2k12 Core Service Basic Configuration

2k12 Core Service Basic Configuration

Introduction

The following article provides the steps required in PowerShell to configure the basics on a Windows 2012 Core Services server.

The article will provide the steps required to perform the following configurations :-

  • Rename the server
  • Configure IPv4 details for a network adapter
  • Configure DNS Server for a network adapter
  • Enable RDP access

Opening Powershell

The first thing to do after logging on to the Windows 2012 Core Services server is to open Powershell.  To open Powershell on the server perform the following steps :-

  • In the Command Prompt execute the following to open an additional Command Prompt window

start cmd

  • In the newly opened Command Prompt window execute the following to open Powershell

powershell

I prefer to open an additional Command Prompt to do things on a Core Services server so that if I type exit by mistake I don’t have to start the Command Prompt window again through the Task Manager.

Rename The Server

The first step is to rename the server from the WIN-xxxxxxxxxx name randomly generated.  To rename the server perform the following steps :-

  • In Powershell execute the following to rename the server

Rename-Computer -NewName “{your server name}” -Restart

E.G. Rename-Computer -NewName “MyServer” -Restart

  • The server will now be restarted and renamed

Configure IPv4 Details For A Network Adapter

The next step is to configure the server’s IPv4 details by performing the following steps :-

  • In Powershell execute the following to find the Network Adapter Index Number

get-netadapter -Physical

  • A list of the Physical Network Interfaces ont he server will be displayed.

N.B. For the purposes of this article only one Network Adapter was used on the Virtual Machine

  • Next configure the IPv4 Address, Default Gateway, and Subnet Mask (Using the -prefixlength option) by executing the following command

New-NetIPAddress -IPAddress xxx.xxx.xxx.xxx -defaultgateway xxx.xxx.xxx.xxx -prefixlength 24 -interfaceindex 12

E.G. New-NetIPAddress -IPAddress 192.168.0.100 -defaultgateway 192.168.0.254 -prefixlength 24 -interfaceindex 12

  • Once the command executes it will display the IPv4 Settings applied to the server

Configure A DNS Server For A Network Adapter

The next step is to configure the DNS Server for the Network Adapter by performing the following steps :-

  • In Powershell execute the following to find the configure a DNS Server

Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses xxx.xxx.xxx.xxx

E.G. Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.0.1

Enable RDP Access

The last step in this article is to enable RDP Access to the server by performing the following steps :-

  • In Powershell execute the following to find the configure a DNS Server

get-CimInstance “Win32_TerminalServiceSetting” -Namespace root\cimv2\terminalservices | Invoke-CimMethod -MethodName setallowtsconnections -Arguments @{AllowTSConnections =1; ModifyFirewallException = 1}

W2K8 R2 – Network Optimisations For VMware Guests

W2K8 R2 – Network Optimisations For VMware Guests

This article provides several networking optimisations for a Windows 2008 R2 Virtual Machine.

The following sections provide details on different settings which can be modified for both the Operating System and the VMXNET 3 network driver.

Disabling IPv6

If you have no need for IPv6 on your network then disabling it will cut down on unnecessary network traffic.  IPv6 can be disabled either through the registry as shown below or through the Network Card Properties :-

reg add hklm\system\currentcontrolset\services\tcpip6\parameters /v DisabledComponents /t REG_DWORD /d 255

Adding the registry key above disables IPv6 for all adapters on the server.  If you only want to disable it for certain adapters you will need to disable it through the Network Card Properties as shown below :-

  • Go to the Network and Sharing Centre either through the Control Panel or by Right Clicking the Network icon in the Systray
  • Select Change Adapter Settings in the Top Left of the screen
  • Right Click on the Adapter you wish to disable IPv6 on and selectProperties.
  • Untick the Internet Protocol Version 6 (TCP/IPv6).
  • Click on OK to save the setting

Disable TCP Chimneying

TCP Chimneying or TCP Offload is designed to transfer the network load  from the CPU’s to the network adapter.  There have been various reports of slow networking on Windows 2008 R2 virtual machines and long transfer times of files across the network and many people disable this technology.  To disable TCP Chimneying on a server perform the following steps :-

  • Right Click on the Command Prompt icon in the Start Menu and selectRun as Administrator and if necessary authenticate when prompted.
  • In the Command Prompt execute the following :-

netsh int tcp set global chimney = disabled

  • The command will return Ok. when executed

A reboot is required in order to implement the change.

Disable TCP Autotuning

There have been various reports of slow networking on Windows 2008 R2 virtual machines and long transfer times of files across the network and many people disable this technology.  To disable TCP Autotuning on a server perform the following steps :-

  • Right Click on the Command Prompt icon in the Start Menu and selectRun as Administrator and if necessary authenticate when prompted.
  • In the Command Prompt execute the following :-

netsh int tcp set global autotuninglevel = disabled

  • The command will return Ok. when executed

A reboot is required in order to implement the change.

W2K8 R2 Clustering 3 – Creating A Cluster

W2K8 R2 Clustering 3 – Creating A Cluster

The last step in creating a Failover Cluster on Windows 2008 R2 is to run the Create A Cluster wizard.  To run the Create A Cluster wizard perform the following steps :-

  • In Server Manager expand Features
  • Click on Failover Cluster Manager
  • Under Management click on Create a Cluster
  • At the Before You Begin screen click on Next to continue
  • At the Select Servers or a Cluster screen either enter the names of the cluster nodes or browse AD and select them
  • When prompted enter in the Name you want to give the cluster
  • Click on the Address section and allocate the IP Address you want to use for the cluster
  • Click on Next to continue
  • At the Confirmation screen confirm the settings you have configured and then click on Next to continue
  • The cluster will now be created
  • At the Summary screen click on Finish

W2K8 R2 Clustering 2 – Running The Cluster Validation Tool

W2K8 R2 Clustering 2 – Running The Cluster Validation Tool

The next step in creating a Failover Cluster is to run the Cluster Validation Tool on the first node.  To run the Cluster Validation Tool perform the following steps :-

  • In Server Manager expand Features
  • Click on Failover Cluster Manager
  • Under Management click on Validate a Configuration
  • At the Before You Begin screen click on Next to continue
  • At the Select Servers or a Cluster screen either enter the names of the cluster nodes or browse AD and select them in turn
  • At the Testing Options screen select Run all tests and then click onNext to continue
  • At the Confirmation screen confirm the tests to run and then click onNext to continue
  • The tests will now run on the nodes
  • At the Summary screen confirm that it says that the configuration appears to be suitable for clustering

W2K8 R2 Clustering 1 – Installing The Failover Clustering Feature

W2K8 R2 Clustering 1 – Installing The Failover Clustering Feature

The first step in the creation of a Windows 2008 Failover Cluster is to install the Failover Clustering feature.  In order to install the Failover Clustering feature perform the following steps :-

  • In Server Manager click on Features
  • Click on Add Features
  • When prompted select Failover Clustering and then click on Install

Repeat the steps above on all of the servers which are to be added to the cluster.

W2K8 R2 Clustering – Introduction And Pre-Requisites

W2K8 R2 Clustering – Introduction And Pre-Requisites

Server Clustering has been redesigned in Windows 2008 as the Failover Clustering feature with the aim of simplyfing their deployment, enhancing their security, and increasing stability.

The aim of the following articles in this series are to provide a step by step guide to installing a new Failover Cluster which can be split in to the following parts :-

  1. Adding the Failover Cluster feature
  2. Running the Cluster Validation Tool
  3. Creating the Cluster

Pre-Requisites

In order to create a simple two node failover cluster in Windows 2008 R2 the following pre-requisites must be met :-

  • Two servers (Preferably of the same hardware specification)
  • Either Windows 2008 R2 Enterprise or Datacentre Edition installed on both servers
  • iSCSI or SAN attached disks

In Failover Clustering on Windows 2008 R2 shared data disks has now been dropped and any storage to be used by the cluster must support SCSI-3.

Optional Cluster Heartbeat Card

There is some discussion on the web regarding whether or not a seperate network card is needed for Cluster Heartbeat in Windows 2008 Failover Clustering.

For the environment used for these articles I added an additional network card with no adverse effects.