Error 80070645 while updating SCOM agent

Lately we were updating a SCOM 2022 to the SCOM 2025 version and after the management servers and so on we started with agent updates. While trying to update some agents a day later we got this error:

The Operations Manager Server failed to perform specified operation on computer XXXXXX
Operation: Agent Install
Install account: XXXXXX
Error Code: 80070645
Error Description: This action is only valid for products that are currently installed.

Aside from a few old blog posts with other types of reasons, we went looking.

The agent was definitely installed, so that is why the description threw us off!

In this case, the SCOM agent was installed, but a few of the agents already got updated to the newer version on the first day! So we were pushing agent upgrade on the machine that already had the agent updated.

Just so you know, it could be the product is there and the update was no longer needed. Check that first when you run into this error.

Have fun monitoring stuff!
Bob Cornelissen, MVP