Software

WSUS: How importing updates with PowerShell works

WSUS: How importing updates with PowerShell works

Acronym of Windows Server Update Services, WSUS is an update management service made available by Microsoft for Windows operating systems. WSUS allows network administrators to monitor, manage and deploy updates software for Windows devices connected to the local network.

When a Windows device is configured to receive updates via WSUS, instead of downloading packages directly from Microsoft servers, they come from server WSUS configured in LAN.

With WSUS, the administrators they can centrally manage updates for all Windows devices on the network and decide which ones to deploy and when. Also, WSUS allows you to shrink the network traffic given the possibility of downloading the Microsoft packages only once for all the machines connected in the local network. Furthermore, WSUS offers the possibility to customize the distribution of updates (e.g. for groups of devices) and automatically generate summary reports.

Importing updates into WSUS with a PowerShell script

Until now, the importation of updates to be distributed on the local network was possible by relying on the historic Microsoft Update Catalog. However, the Redmond company has decided to retire, after so many years, the historic underlying platform still based on the ActiveX framework.

Microsoft then explained that a dedicated script PowerShell permanently replaces the old procedure of importing updates in WSUS.

To get the PowerShell script you can refer to the Microsoft documentation or select Actions, Import Updates in the WSUS user interface: the platform thus provides instructions for downloading the same object.

The procedure for importing updates via script

Once the Microsoft-crafted PowerShell script is stored locally, you need to search through the Microsoft Update Catalog the update to deploy.

Usually the update of interest is searched for by entering the corresponding number of Knowledge Base (KB prefix) in the search box. By clicking on the link matching the description of the update, on the results page provided by Microsoft Update Catalogyou have to write down the long alphanumeric code shown to the right of UpdateID. You can copy it to the clipboard by pressing the button Copy.

WSUS, importing Microsoft updates

If you want to import more updates, the advice is to create a list of UpdateID (one for each Microsoft package) within a text editors. Everything is fine UpdateID must be placed on one riga itself in the text file.

At this point, you can run the PowerShell file using the syntax described in the documentation. For example, to start theimport to WSUS using the default port on the local system (localhost) and the text file containing a series of UpdateID you can type the following:

ImportUpdateToWSUS.ps1 -UpdateIdFilePath .\file.txt

The object from the name file.txt is the one containing the list of UpdateIDpreviously composed.

However, it should be kept in mind that updates do not come downloaded upon import. It is therefore important to check the settings to make sure when the actual download takes place.

Leave a Reply

Your email address will not be published. Required fields are marked *