I was trying to update my dbatools install to test something and go this error.
I fixed it with a little help.
The Fix
The short answer from Chrissy LeMaire is to run this:
install-module dbatools -Force –SkipPublisherCheck
That worked.
Why?
Chrissy explained this, but essentially it’s a certificate approval thing. Certificates work by verifying each other in a chain. One cert checks another, which checks another, etc.
In this case, Microsoft changed some things and while the dbatools goes through some of these things, the update-module is doing extra checks. Supposedly MS will fix this.
In any case, if you need an update, you need to bypass things for now.


I’ve been uninstalling the module and reinstalling it, sure the comparison seems to be checking whether the publisher unexpectedly changed between versions. Also, this prevents accumulation of dozens of old versions, which can really start adding up.
It’s a pretty annoying process, though. You have to start PowerShell without a profile if your profile loads the module (which I do, since the load order of the two SQL modules has to be dbatools before SqlServer), then uninstall the dbatools & dbatools.library modules in the right order before you can force-install the new version.
LikeLike