Wapt Windows Update

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
mouka
Messages: 33
Registration: May 14, 2019 - 3:13 p.m.

February 12, 2020 - 11:42

Hello,
I have a WAPT server running CentOS 7.5.
WAPT Server version: 1.8.0,
WAPT Agent version: 1.8.0.6631,
WAPT Setup version: 1.8.0.6641,
WAPT Deploy version: 1.8.0.6641.

I'm testing WAPT Windows Update.

Is it possible to get a list of all the Windows updates required for at least one client machine? Specifically, the number of computers requiring this update.

In PowerShell, I use `.ComputersNeedingThisUpdate` for each update.

For example, if I have the update ID, I can get the number of PCs that need this update with this: `
(Get-WsusUpdate -UpdateServer $WSUSServer -UpdateId 62df7893-67b9-4673-ad61-4e0381474671).ComputersNeedingThisUpdate`.

This is so I can apply this update list to a set of client machines, at least one of which needs this update, via a WAPT package.
It's not practical to assign an update list to each client individually, as WAPT Windows Update currently allows.

Thank you.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

February 12, 2020 - 12:36

Good morning

I opened an issue here to add the "show clients" button to the Windows Update tab

In the meantime, you can run an SQL query for this:

Code: Select all

SELECT h.computer_fqdn,w.status,w.installed,w.update_id
from wsusupdates u
left join hostwsus w on w.update_id=u.update_id
left join hosts h on h.uuid=w.host_id
where '2538243'=any(u.kbids)     


In the example, 2538243 is the kb kb2538243
mouka
Messages: 33
Registration: May 14, 2019 - 3:13 p.m.

February 12, 2020 - 2:49 PM

Thank you for your quick reply.
I see that Wapt Windows Updates allows for very granular management of Windows updates on a PC-by-PC basis.
But please reassure me, the purpose of Wapt Windows Updates isn't to apply updates PC by PC, is it?
What is your procedure if, for example, I want to apply all "Critical Only" updates to 200 PCs?
More importantly, what happens if I do this on all 200 PCs, even though some don't require these updates? I can't create Wapt packages for PCs requiring specific updates every day. Besides, the list of PCs needing an update today won't be the same the next day.
Thank you again.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

February 12, 2020 - 9:09 PM

mouka wrote: Feb 12, 2020 - 2:49 PM I've noticed that Wapt Windows Updates allows for very granular management of Windows updates on a PC-by-PC basis (one by one).
But please tell me, the purpose of Wapt Windows Updates isn't to apply updates PC by PC, is it?
Rest assured, the purpose of Wapt Windows Updates is not to apply updates PC by PC ;)
mouka wrote: Feb 12, 2020 - 2:49 PM What is your procedure if, for example, I want to apply all "Critical only" updates to 200 PCs?
In the event that you wish to apply all critical updates to your entire fleet, you can create a wsus package "wsus-critique-only" and add all critical cabs as "allowed".

You can then push the wapt wsus-critique-only package to your entire network (or via OU for example).

Now when you run a scan for Windows updates, all updates will appear as missing since they have been authorized.
mouka wrote: Feb 12, 2020 - 2:49 PM But above all, what happens if I do it on these 200 PCs when some do not require these updates?
No problem. We allow updates, we don't force the installation. If we allow a Windows 7 update on a Windows 10 system, it won't start the installation
mouka wrote: Feb 12, 2020 - 2:49 PM Since I can't do daily Wapt packets for PCs needing specific updates. Not to mention that the list of PCs needing updates today won't be the same the next day.
Thanks again.
A wsusscn2.cab file is released once a month, on the second Tuesday of the month. However, you can also configure wapt-get.ini to automatically allow reviews

https://www.wapt.fr/fr/doc/wapt-usage/w ... wapt-agent

Code: Select all

[waptwua]
allowed_severities=Critical
 
But I don't recommend this method; I find it just as easy to check once a month (the second Thursday of each month, for example) and sort through it yourself—it's neater
mouka
Messages: 33
Registration: May 14, 2019 - 3:13 p.m.

February 13, 2020 - 3:51 PM

Great, that's pretty much what I was hoping for.
I'm still testing wapt ent. I want to uninstall KB925673 on a set of client PCs. To do this, I created a rule called sup-KB925673 which contains KB925673 but as a prohibited update. (It's not easy to find KB925673 in the KB list, as there's no search function, but by sorting them by KBs, you can manage it). Anyway!
So, I have a wapt package called sup-KB925673. I assign this to a client PC from which I want to remove KB925673.
In the console on the left, I select the client PC in question, on the right I select the sup-KB925673 package, and I click "install package." The process starts...
which should uninstall KB925673 from my client PC.
But that's not the case!
Even restarting the client PC doesn't produce the desired result…
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

February 13, 2020 - 6:19 PM

Hello Mouka,
mouka wrote: Feb 13, 2020 - 3:51 PM Very good, that's pretty much what I was hoping for.
I'm still testing wapt ent. I want to uninstall KB925673 on a set of client PCs. To do this, I created a rule called sup-KB925673 which contains KB925673 but as a prohibited update. (It's not easy to find KB925673 in the KB list, because there's no search function, but by sorting them by KBs, you can manage). Anyway!
So I have a wapt package called sup-KB925673. I assign this to a client PC from which I want to remove KB925673.
In the console on the left, I select the client PC in question, on the right I select the sup-KB925673 package, and I click "install package". The uninstaller is running…
which should uninstall KB925673 from my client PC.
But it's not doing anything!
Even restarting the client PC doesn't produce the desired result…
The WAPT Windows Update client behaves like WSUS in this respect: it blocks the KB installation but doesn't uninstall it if it's already installed. WSUS adds an option to request uninstallation from a specific machine. The problem here is that most KBs are flagged by Microsoft as "non-uninstallable." In practice, it's often still possible to uninstall them, but the result isn't guaranteed.

To reproduce this behavior and force uninstallation, an uninstallation package needs to be created (I'll try to publish an example). I'll see if we can integrate the package creation into the wizard.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
mouka
Messages: 33
Registration: May 14, 2019 - 3:13 p.m.

February 19, 2020 - 09:44

Okay, I'll wait for your reply on this.
I have a WAPT WUA package named sup-KB925673, as discussed above, and it didn't do the job I wanted. Now I want to get rid of this sup-KB925673 package (of which there are two versions). This package is no longer assigned to any machine. Using the right-click menu, I was hoping to find something like "delete" or "remove" the package in question, but there's nothing like that.
Is there a way to delete this rule that corresponds to the WAPT WUA package named sup-KB925673? So that it no longer appears in the list of WAPT WUA packages. Thank you.
mouka
Messages: 33
Registration: May 14, 2019 - 3:13 p.m.

February 19, 2020 - 09:57

I have the answer, in fact "Delete selected rows" deletes the packet from the server, not just the rows from the table. :oops:
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

February 20, 2020 - 10:49

Hello Mouka,
To remove the package, you need to create an uninstall package. You can use the example below as a guide (in this example, it removes a KB article that disables ActiveX support in Internet Explorer). This will be integrated directly into the WAPT Windows Update interface.
Sincerely,
Denis

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
from waptenterprise.waptservice.enterprise import *
uninstallkey = []

def install():
    print('installing %s' % control.asrequirement())
    installed_kbs = installed_windows_updates()
    for kb in ['4487017','4018300']:
        if force or [u for u in installed_kbs if u['HotFixID'] == 'KB%s' % kb]:
            try:
                print('Trying to uninstall %s' % kb)
                active_sessions = get_active_sessions()
                for session_id in active_sessions:
                    start_interactive_process(makepath(system32(),'wusa.exe'),'/uninstall /kb:%s /norestart /quiet' % (kb,) ,session_id=session_id)
                #print(run('wusa.exe /uninstall /kb:%s /norestart' % kb,timeout=60))
            except Exception as e:
                print('Unable to uninstall %s: %s' % (kb,e))
        else:
            print('%s is not installed' % kb)

def audit():
    print('Auditing %s' % control.asrequirement())
    installed_kbs = installed_windows_updates()
    errors = []
    for kb in ['4487017','4018300']:
        if [u for u in installed_kbs if u['HotFixID'] == 'KB%s' % kb]:
            errors.append(kb)
    if errors:
        print('Errors : %s' % errors)
        return 'ERROR'
    else:
        return 'OK'
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked