How to disable a network enabled plugin on all sites, excepting on one?

So the code is for one site, and you want it to be for all except one. You need to change the == part to != in order to do this. This way instead of running the code inside the if on the site with ID 2, it will run on all sites except the one with ID 2.

But I don’t know why you would do this, since you can activate a plugin only on one site by just activating it from its dashboard (you do not need to network activate it).