Although after the installation of Windows 10, the built-in version of Microsoft Defender Antivirus will download and apply the most recent updates automatically, the process does not happen immediately, leaving the system temporarily vulnerable to attacks during this period.
Since it could be many hours before the system receives the update, Microsoft created a tool, which allows system administrators (and technical users) to service an image to maintain an updated version of the anti-malware solution, even before deployment with a few commands reducing exposure.
The solution is available for Windows 10 Home, Pro, and Enterprise as well as for Windows Server 2019 and 2016. It includes the most recent updates (until the release of the standalone package) and a PowerShell script that automates the process to update the installation image (install.wim) or Virtual Hard Disk (VHD) files.
In this Windows 10 guide, we will walk you through the steps to update an installation image with the latest security intelligence package available since the tool’s release.
How to update Microsoft Defender on Windows 10 image
To update the Microsoft Defender Antivirus for system installation image, use the steps:
Connect a USB installation media of Windows 10 to the computer.
Quick tip: You can also update a virtual hard drive (vhd) containing an installation of Windows 10.
In the command, replace “TEMP-LOCATION” with the path to a folder that the script will use to process the update. Then replace “PATH\TO\INSTALL.WIM” with the path to the image.wim file you want to update. Finally, replace “PATH\TO\DEFENDER\CAB\UPDATE” with the path to the Microsoft Defender update. This is the cab file available with the update package.
For example, this command updates the install.wim image in a USB bootable media:
Quick note: If you were updating a virtual machine, you would would only need to adjust the path for the vhd image. For example, .\DefenderUpdateWinImage.ps1 -WorkingDirectory "G:\temp" -Action AddUpdate -ImagePath "E:\vms\windows10.vhd" -Package "C:\Users\username\Downloads\defender-update-kit-x64\Defender-Dism-x64.cab"
Confirm the update has been applied successfully.
Source: Windows Central
Once you complete the steps, the PowerShell script will update the Windows 10 image with the most recent platform, engine, and signature version of Microsoft Defender Antivirus.
At the time of this writing, the solution updates Microsoft Defender to version 1.1.2102.3, platform version 4.18.2011.6, engine version 1.1.17800.5, and signature version 1.331.174.0.
How to view Microsoft Defender update details on Windows 10 image
To confirm the Microsoft Defender Antivirus update details inside the image, use these steps:
Open Search.
Search for PowerShell, right-click the top result, and select the Run administrator option.
Type the following command to open the directory with the extracted files and press Enter:
cd PATH\TO\DEFENDER-UPDATE-KIT
In the command, make sure to specify the path of the folder with the extracted files.
For example, this command opens the folder with the extracted files inside the Downloads folder.
cd C:\Users\username\Downloads\defender-update-kit-x64
Type the following command to view the Microsoft Defender Antivirus information and press Enter:
In the command, replace “TEMP-LOCATION” with the path to a folder that the script will use for the process, and make sure to change “PATH\TO\INSTALL.WIM” for the location to the Windows 10 image, you want to see the updated information.
For example, this command processes and shows update details on a USB installation media with the “E” drive letter:
In the command, replace “TEMP-LOCATION” with the path to a folder that the script will use for the process, and make sure to change “PATH\TO\INSTALL.WIM” for the location of the image.win you recently updated.
For example, this command removes the Microsoft Defender Antivirus update on a USB bootable media with the “E” drive letter:
Once you complete the steps, the script should remove the recently applied antivirus update on the Windows 10 image you specified in the command.
This process should work without issues on most devices running the most recent version of Windows 10. However, if you have problems running the commands, double-check you are typing the command correctly, and make sure you are using PowerShell version 5.1 with the “Microsoft.Powershell.Security” and DISM modules installed.