Windows Patch Automation

We regularly receive questions from IT administrators who desire to have more control over their patch management processes as well as better automation for their patching systems. One of the phrases that we have begun to hear more and more frequently is “patch fatigue” and how it’s affecting so many organizations all over the world. Not surprisingly, patch fatigue seems to be one of the elements that drives admins to find patching solutions like BatchPatch.

When it comes to patch automation, in particular, there is a kind-of critical threshold that must be carefully assessed. Some automation is a good thing, but too much automation could actually be a bad thing if it comes at the cost of control over the entire process. If you have everything setup to run automatically without the administrator even having to monitor everything, that sounds very nice! But just because you have setup everything to run automatically does not mean that forgoing monitoring of the entire process is necessarily a good idea. And in many cases I would argue that it’s a horrible idea, but this really depends on the particular environment’s needs, service level agreements, etc. When it comes to automation we have some users who are *truly* obsessed with automating everything. Sometimes they even want to automate all the way to the point that they have automated processes setup with the sole purpose of configuring their automation for other processes, like some sort of meta-automation, if you will. 🙂

However, I would argue that there is a point where too far is too far. Ideally, the administrator really should be monitoring his/her patching processes, even if the processes themselves are launched by automated tasks. If you are able to get away without real-time monitoring, that’s all well and good, and I’m happy for you that your environment allows for that level of flexibility. You may very well not even need a third-party patch management tool. People often say things like “There is no need to use third-party patch management tools when you can just use WSUS and group policy.” This is definitely true for some environments, but generally people who make these blanket statements fail to realize that this is simply not an option in many environments, especially in environments where uptime is critical or where maintenance windows are small, or where the number of systems being patched is large. And so when I see someone make a statement like this I immediately know that one of a few things is true about his/her environment. He/she is likely dealing with a more casual environment where patches can be installed in large time window, reboots can be done without concern for exactly when those reboots occur, and perhaps also the number of computers involved is not all that high. In these cases, the administrator can develop processes that rely on automation while sacrificing precision, control, and real-time monitoring, and so WSUS and group policy alone might be sufficient in these cases. But for the rest of us who need to control precisely when our machines download and install updates or precisely when our machines reboot, and we need to monitor to make sure they are back online by a certain time and that various services are up and running after the machines are online, that’s where third party patching applications like BatchPatch come in to play. And for those of us who like to automate while still maintaining a high degree of precision and control over the whole process, BatchPatch has more advanced features like the ‘Job Queue‘ and the ‘Advanced Multi-Row Queue Sequence‘ that can be used in conjunction with the ‘Task Scheduler‘ for all of your automation desires.

Posted in Blog, General, Tutorials | Tagged , , | Comments closed

Using BatchPatch to Modify Local Group Membership on Multiple Remote Computers

Today I’m going to demonstrate how to use BatchPatch to perform a routine task that administrators have to complete periodically, which is to edit the group membership of a particular local group on multiple computers. The cool thing with BatchPatch is that you can do all of the computers in a single shot.

To perform the actual group membership change we’re going to use the ‘Net localgroup‘ command that’s built in to Windows. However, we’ll use BatchPatch to execute the required commands, which enables us to target numerous remote computers at one time. For reference we will be using some of the commands outlined here.

  1. First let’s make a quick configuration change. Under ‘Tools > Settings Remote Execution’ let’s change the ‘Remote execution context’ to ‘Elevated token’ for ‘Remote process/command (logged output).’ The default configuration is set to use SYSTEM, which works best for most situations, but there are some situations that could require a different execution context, and this is one of those times. If you try to execute a ‘Net localgroup’ command under the SYSTEM context, it may work or you may get an error, depending on the account that is being used and the target system configuration. However, using ‘Elevated token’ should work for all scenarios (unless, of course, the account you are using simply does not have the necessary permissions needed to change the group membership on the target computer).
  2. net localgroup GroupName displays a list of users or global groups in a local group, so let’s start by listing out the users/groups contained in our local administrators group on the target computers. To do that I clicked on ‘Actions > Execute remote process/command > Create/modify remote command 3 (logged output)’. In the remote process window I typed ‘net localgroup administrators’ and then clicked ‘Execute’ so that the command would run on the highlighted computers in the grid.

  3. If we want to remove ‘johndoe’ from the administrators group, we can run ‘net localgroup administrators johndoe /delete’

  4. Similarly, if we want to add an account or global group to the local group, we do it with ‘net localgroup administrators johndoe /add’

  5. That’s all there is to it. If you want to execute this on many computers, simultaneously, all you have to do is highlight the desired rows in your BatchPatch grid before clicking the ‘Execute’ button!
Posted in Blog, General, Tutorials | Tagged , , | Comments closed

Remote Windows Update Script

Many sysadmins love to write scripts to solve the problems that exist in their environments. This is something we understand very well. 🙂 If you’re reading this right now then one major problem that you probably face is having to regularly ensure that your computers are completely up to date. However, some problems either aren’t so easily solved by a simple script, or are a huge time-drain to get up an running in a way that is useful enough to deploy in a production environment. When it comes to Windows Updates, in particular, frequently it’s not sufficient to simply deploy a script to remotely initiate Windows Update. As an IT administrator you often need more control. After all, if something doesn’t work right or if you can’t efficiently monitor the process, things can quickly become unwieldy, particularly when you’re working with a limited time window with critical servers that absolutely have to be online outside of maintenance periods. BatchPatch was created with the goal of helping to ease the patch management burden on systems administrators. After all, they don’t call it ‘patch installations’ for a reason. It’s a process… it’s something that, unfortunately, really has to be managed! Hence the term ‘patch management.’

In the most basic configuration for the simplest environments the goal might just be to download and install Windows Updates on all networked computers and then trigger them to reboot. Even in this seemingly straightforward process there’s actually a lot that can go wrong, especially when you are dealing with a lot of computers, and especially when there is a time crunch. And as you surely already know, there is virtually *always* a time crunch. How does the saying go? “Too much to do, too little time!” For example, what happens if a couple of computers don’t come back online after they are rebooted? If you don’t have a system that monitors uptime, how do you discover that these computers never came back online? If you do have a system that monitors uptime, usually it’s going to be disabled during the maintenance window so that it doesn’t buzz away with false alarms for every single rebooted computer. The problem here is that you won’t find out which computers haven’t come back online until *after* you’ve re-enabled your monitoring service *after* the maintenance has ended, which is too little too late!

In many environments there is a much higher degree of complexity, so the goal can’t always be as simple as downloading and installing Windows Updates on all networked computers and then triggering them to reboot. Sometimes, for example, there are dependencies across multiple computers. Maybe one computer can’t be offline unless another computer is online, and vice versa. Or maybe there are services on certain machines that have to be stopped before applying updates, and then those same services have to be re-started after the updates have been applied, with verification that the services are running properly. You might realistically want or need to execute a series of actions, in sequence, across numerous computers. And with all of this you still have the most basic requirement of needing to be able to monitor the process in real-time to make sure that when the maintenance window ends you have actually completed the entire process with all servers and services verified as being back online and performing their normal duties. Without a tool dedicated to help you with this process you’d be looking at spending practically all your working hours on patch management, which simply isn’t realistic in the IT industry. You are always going to have too much to do with too little time to do it, so choose wisely to help save yourself time and energy!

Posted in Blog, General | Tagged , | Comments closed

An Alternate Way to Check if Computers Have a Particular Windows Update Installed

BatchPatch provides a way for you to generate an update history report for all of your computers to see which computers have installed or have not installed particular updates. There is a tutorial that illustrates this method for update history reporting here: Create a Consolidated Report of Windows Update History

However, there is another way to accomplish this task that I’d like to share with you here. If you have any issues with the other method or if that method isn’t providing the information to you in a way that suits your needs, you could try this alternate method to figure out if a particular Windows Update has been or has not been installed on target systems. Depending on the situation you might find one method more suitable or desirable than the other.

Let’s say for the sake of this example that the update you want to check your computers for is KB3150513. We can use a WMIC command to ask Windows if this update is already installed or not. The command line syntax would be:


Another way to write this command is:

WMIC PATH Win32_QuickFixEngineering WHERE HotFixID='KB3150513' GET HotFixID

And if you want to look for more than one update, you can also structure your command as follows:

WMIC QFE WHERE (HotFixID='KB3150513' or HotFixID='KB4015217' or HotFixID='KB4015438' or HotFixID='KB4014329' or HotFixID='KB4013418') get HotFixID

If you were to run one of the above commands at the command prompt of a given computer, you would see something like this. Note that in the second command only 2 of the specified KB IDs were found, so only 2 were printed in the result list:

However, it’s not all that practical to log on to every single target computer just to run the command above. After all, that’s why you have BatchPatch in the first place– so that you can execute commands and retrieve information from numerous computers, simultaneously. To execute one of these commands from BatchPatch on numerous target computers you can simply use the ‘Remote command (logged output)’ feature in BatchPatch.

  1. Go to ‘Actions > Execute remote process / command > Create / modify remote commands (logged output)’
  2. In the window that appears we need to add a new row and insert our command, as shown in the screenshot below:
  3. After clicking OK to the ‘remote commands (logged output)’ window we can now simply select the desired rows in the grid (I only have one computer available for testing at the moment), and then select ‘Actions > Execute remote process / command > Execute saved remote commands (logged output)’ and then click on the desired command that we just created a moment ago.
  4. When the query completes, if it finds the specified update has been installed, then it will display just like my screenshot below. If the update is not found, then the result will be empty instead.
Posted in Blog, General, Tutorials | Tagged , , , | Comments closed

Deploy a Specific Windows Update KB ID

Today I want to spend some time clarifying the answer to a question that we commonly receive. Some BatchPatch users want to simply deploy a particular Windows KB update to target computers. They essentially want to be able to just enter a KB ID number into the BatchPatch GUI, with BatchPatch then handling the rest of the process. However, this is not quite how it works. Below I will explain your options for deploying a specific Windows KB update.

Why Can’t I Simply Enter a KB ID Number and Have BatchPatch Handle the Rest?

Well, actually you *can* enter a KB ID directly into BatchPatch, but you need to first understand what this accomplishes in the software so that you are not confused if/when the update KB ID that you specified does not get installed.

If you use BatchPatch to initiate a Windows Update action on target hosts, BatchPatch first has to initiate a scan for available updates, and then once it finds updates that are available to the particular computer, it will download and install those updates based on any preferences and filters that you have previously configured in BatchPatch.

That said, BatchPatch allows you to enter a filter list of KB ID numbers that you want to be included during the download/install process. When the ‘include’ filter list is utilized, only updates that are on that list will be installed. Any other update that BatchPatch finds as “available” that is *not* also on the ‘include’ filter list will simply not be downloaded/installed. However, it’s also the case that if a KB ID is on the ‘include’ list but that KB ID is not found as “available” to the computer, then that KB update will *not* be installed.

The primary issue that users are sometimes confused by is that they expect if they enter a particular KB ID into the ‘include’ filter list that it will automatically always be installed. However, that is simply not the case. The ‘include’ filter list lets the administrator filter the list of “available” updates so that only a subset of those available updates are installed. If an update is not available to the computer then it does not matter if it’s in the filter list or not, it cannot and will not be installed via this method.

We demonstrate how to use the filter lists in this tutorial: Remotely Install Only a Subset of Available Windows Updates

Is It Possible to Directly Install a Specific KB ID Without First Scanning for Available Updates

You may, in fact, do a direct KB update deployment, if you desire. However, in this case you would then have to make sure that you not only have the correct update file for the target computer’s operating system, but you would also have to make sure that the target computer actually needs the update. If it does not need the update or if it’s the wrong OS, the deployment will fail. To deploy a standalone KB update file you would first need to download the update file from Microsoft. Usually the standalone updates come in the .MSU flavor, but they could also be packaged as .EXE, .MSI, or .MSP in some cases. You might even occasionally find a different package type altogether.

Once you have downloaded the desired KB update, you may follow the tutorial at the following link to deploy it directly to target computers:
Remote Script Deployment – Install Multiple .MSU Files in a Single Action on Remote Computers

2015-01-08 14_15_12-new 1 - BatchPatch X6

Posted in Blog, General, Tutorials | Tagged , , | Comments closed

Protecting Your Machines from the WannaCry Malware

By now most of you have surely read about the new WannaCry ransomware malware that has recently been disabling computers and networks all over the planet. Protecting your computers is very easy, but you have to care enough to make sure that you’ve done what needs to be done!

Deploying the WannaCry Patch to Current / Supported Operating Systems

In March Microsoft released a Windows update to fix the file-sharing vulnerability that WannaCry utilizes to install itself in systems. If you have been regularly installing Windows updates on your computers then you should already be safe. Make sure that you have the March updates installed, but also use this time to evaluate your entire patching policy. Do you patch semi-annually or quarterly? It is my opinion that if you are not patching every single month to apply the latest Windows updates, then you are inviting malware into your network. In 2017 if you want to keep your computers and network virus-free, the absolute number one most important and simplest thing that you should be doing is applying Windows updates relatively soon after they are released by Microsoft.

Yes, it’s true that when Microsoft releases updates they can sometimes cause problems or wreak havoc on systems, so we do *not* advocate installing Windows updates on production computers on the same day that they are released. We believe the best option 99% of the time is to wait approximately 1 week after Windows updates are released before you deploy them to all of your systems. However, you *should* deploy them to your test lab on the day they are initially released, or the day after. Then wait a week to see if you have any problems in your lab and to see if any problems are reported by other users across the internet. If any patches are determined to cause problems, do your research to make the determination whether or not you should install the patches or wait for a re-release from Microsoft.

The following links demonstrate how to keep your computers up to date with BatchPatch. You may use any of these tutorials to make sure that you are protected from WannaCry:

The following link demonstrates how to see which updates have already been installed on target systems:

Deploying the WannaCry Patch to Unsupported / Old Operating Systems (Windows XP, Windows 2003, Windows 8)

With regard to WannaCry and older operating systems… up until a couple of days ago no patch existed for unsupported operating systems such as Windows XP, 2003, and 8. If you are still using one of these unsupported operating systems in your company, then you need to seriously consider why that’s the case. At this point in 2017 there is really almost no good reason to still be running one of these OSes, and even if you have a good reason for running one of these OSes in a corporate environment, you should still be looking to move away from them ASAP. If you’re a home user and you never got off of XP or 8, this should be a wake-up call. Your personal computer is just as vulnerable to WannaCry as any corporate machine.

If you are trying to deploy the WannaCry fix to your XP, 2003, or 8 computers, you have two options. You can use BatchPatch to apply the available Windows Updates using one of the methods outlined below in the following tutorials:

Alternatively you may deploy the standalone offline patch installer file to your target computers using the BatchPatch ‘deployment’ feature. The patch for each of the above-mentioned unsupported operating systems is linked off the bottom of this page:

Instructions for deploying standalone exe, msi, msu, and msp files can be found at but don’t forget about the silent /quiet installation parameter! More on that here:

Posted in Blog, General, Tutorials | Tagged , , | Comments closed

Remote Registry Updates with BatchPatch

Pretty much every systems administrator will need, at one point or another, to apply a registry update, remotely, to multiple computers. Today I’m going to show you how that can be accomplished quickly and easily using BatchPatch.

  1. First let’s start by looking at the registry key that we plan to update. In the screenshot below you can see that I have the ‘Enable’ DWORD currently set to a value of 1 for HKLM\SOFTWARE\FileZilla 3\fzshellext
  2. For the sake of this example, let’s modify the value and change it from 1 to 0. Prepare a text file that looks like the one I have posted in the screenshot below. You can also create a file like this by using ‘File > Export’ in the Registry Editor window. Then simply modify the resulting file to fit your requirements. I have saved the file to my desktop as FileZilla.reg
  3. We can now use BatchPatch to deploy the FileZilla.reg file to our desired target computers, which will have the effect of creating and applying the specified registry key and value on computers that do not have the key/value in the first place. For computers that already have the registry key and value, it will update the value to the value that we specified in our .reg file. So in my case I already have the key/value in my registry, but I have a value of 1. Since my FileZilla.reg file has the value as 0, once I have successfully deployed the reg file using BatchPatch, the registry value on my test computer will be changed from 1 to 0.
  4. In BatchPatch highlight the desired target computers, and then select ‘Actions > Deploy > Create/modify’
  5. In the deployment window, create the deployment as I have in the screenshot. All I’ve done is used the … browse button to locate the FileZilla.reg file. No other configuration needs to be made. The ‘command to execute’ will be automatically populated by BatchPatch when the .reg file has been selected.
  6. At this point I can execute the deployment by clicking on the ‘Execute now’ button. I could alternatively save the deployment for later execution by using the >> button, but in this instance I have no need to do that, so I’ll just execute it immediately.
  7. Execution completed almost immediately, and I got a blue Exit Code 0 (SUCCESS) message.
  8. We can confirm, if desired, that the change was successful by using ‘Actions > Get information > Get registry key/value. We simply enter the registry key that we want to view.
  9. We can view the output of the above command to verify that our DWORD value is now 0 instead of the previous value of 1.
Posted in Blog, General, Tutorials | Tagged , , , | Comments closed

Deploying a Standardized Hosts File to Multiple Computers on a Network

Recently someone asked us how they could use BatchPatch to replace the ‘hosts’ file on all target computers in their network with a customized ‘hosts’ file that had been created by the IT department. BatchPatch can do this very quickly and painlessly.

First, let’s briefly discuss the ‘hosts’ file for those of you who aren’t familiar with it. Essentially it’s just a text file that Windows uses to map host names to IP addresses. The functionality is similar to the primary functionality of DNS, but instead of requiring a full DNS server, it’s literally just a file on your computer. And if you are using a ‘hosts’ file in conjunction with DNS, the entries in your computer’s ‘hosts’ file will actually override any mappings in DNS for the same hosts.

In Windows, the ‘hosts’ file is located in:


The default file has the following contents:

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#          # source server
#              # x client host
# localhost name resolution is handled within DNS itself.
#       localhost
#	::1             localhost

Perhaps you have a reason to add some custom mappings to all of the computers in your network, like shown in the hosts file below:

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#          # source server
#              # x client host
# localhost name resolution is handled within DNS itself.
#       localhost
#	::1             localhost

Here is how to deploy your custom hosts file to multiple computers in your network:

  1. Prepare your hosts file and save it to any location on your computer.
  2. In BatchPatch select ‘Actions > Copy file/folder > Create/modify file or folder copy
  3. Select or input your source file’s full path. The destination folder will be:

    Make sure to check the ‘Overwrite’ box so that the hosts file on the target computer will be overwritten with your new/custom hosts file.

  4. Finally click the ‘Execute now’ button to copy the file to the selected target computers.
Posted in Blog, General, Tutorials | Tagged , , | Comments closed

Remotely Manage Windows Updates and Reboots on Your Network

Today we are going back to the basics! The core functionality that BatchPatch offers is the ability to easily manage Windows Updates on multiple remote computers, simultaneously. This means that you can do the following:

  • Check a group of computers to see which updates they have available, and optionally produce a consolidated report of the results.
  • Download and/or install available Windows updates on a group of computers, simultaneously, while managing the entire process from a single console. Optionally and automatically reboot the computers after the updates have been installed.
  • Download and/or install only a subset of the available Windows updates on a group of computers.
  • Check which updates have previously been installed on target computers, and optionally produce a a consolidated report of the results.
  • Hide or unhide updates that are visible at the target computer. Once an update has been hidden, it will no longer appear in the list of available updates until/unless it is subsequently unhidden.
  • Reboot or shutdown target computers with real-time monitoring.
  • Create a queue of multiple actions to execute on targets hosts, such as download updates, install updates, reboot, wait for machine to come back online, download updates, install updates, reboot. You can include your own custom scripts, software installations, file copies, registry additions etc.
  • Create scheduled tasks to execute any action or queue.
  • Setup a task to use Wake on LAN to wake up your computers, download and apply Windows updates, reboot, wait 10 minutes, then shutdown.
  • Notify logged-on users of upcoming events or impending reboots.
  • Check target computers to see if the are waiting to be rebooted in order for update installation processes to be completed, and optionally automatically reboot the computers too.
  • Configure email notifications to keep you apprised of task status for tasks that are scheduled outside of working hours.
  • Monitor which services or which automatic services have not started after updates have been applied and computers have been rebooted. Optionally and automatically start the stopped automatic services.

In addition the core functionality described above, BatchPatch also has additional functionality to help manage remote computers.

  • Deploy third party software to target computers.
  • Deploy .MSI packages as well as .MSP, .MSU, .EXE, and pretty much any type of package available.
  • Deploy registry keys/values
  • Deploy and / or execute scripts remotely such as PowerShell (.PS1), VBScript (.VBS), Batch (.CMD and .BAT)
  • Collect information from target computers such as last bootup time, MAC address, hardware information like CPU specs, computer model, available disk space etc.
  • Copy files and folders.
  • Coordinate tasks that have multiple computers dependencies so that, for example, computers can be updated and rebooted in various sequences, or so that only certain computers in a group are taken offline at a given time.

As always you are encouraged to peruse the tutorials on this site. You might find new ways to do things more easily that you hadn’t previously known about. Don’t hesitate to contact us with any questions, comments, or concerns.

Posted in Blog, General, Tutorials | Tagged , , , | Comments closed

Using the HTML Export Feature to Produce Reports

One of the most common questions we get from customers and non-customers is “how do you produce a report of available updates on numerous computers?” There are two basic ways to accomplish this task. The option that you select depends mostly on how you want the report to look. The first method I’ll demonstrate is the HTML export method, as this posting is titled. The second method will illustrate how to export in grid format, so that you can subsequently import into your favorite spreadsheet application for further manipulation and formatting.

Method 1:

The HTML export method enables you to put the actual BatchPatch grid contents into a format that is viewable on any computer, regardless whether or not BatchPatch is installed.

  1. The first order of business is to get the information that you want to display in the report. If we want to display the list of available updates, then I’ll start by executing ‘check for available updates’ on the hosts in the grid.

  2. When the results of the query return we just need to adjust the grid to show only the information that we want in the HTML export. For the sake of this example I only want to display the host name and the report of updates found, which is displayed in the ‘Remote Agent Log’ column. I have hidden all the other columns by right-clicking on the grid column header and deselecting the appropriate checkboxes. You may alternatively use ‘Tools > Customize visible columns’ to display the same checkbox list of columns.
  3. Now that we have only the columns that we want to appear in the HTML report visible in the grid, we can export the grid to HTML using ‘File > Export grid > Export current grid to HTML’
  4. The resultant HTML file displays the grid at the top, and it’s clickable, so that if you click on a cell in the grid it takes you directly to that cell’s corresponding data location in the HTML file. This makes a very convenient little report that can be displayed on any computer.

Method 2:

In the case of creating a report of available updates or a report of previously installed updates on target hosts, you have a second report option in BatchPatch. ‘Actions > Windows updates > Generate consolidated report of available updates’ and ‘Actions > Windows updates > Generate consolidated report of Windows update history’ will give you the information in a format that can be imported into your favorite spreadsheet application.

  1. For this example we will execute ‘Actions > Windows updates > Generate consolidated report of available updates’
  2. When the report executes it opens a new report viewer window, and the results of each target host query are populated in the new window as soon as they return.
  3. Once the data is displayed in the viewer you can use the ‘Export report’ menu item to export the grid to a delimited file or XML.
  4. Once you have exported the report you can use your preferred spreadsheet application to import it for further manipulation or formatting.
Posted in Blog, General, Tutorials | Tagged , , | Comments closed