I've followed the instructions here Create Code Signing Certificate on Windows for signing PowerShell scripts
but it doesn't work as I get this error:
File C:\temp\script.ps1 cannot be loaded. A certificate chain processed, but terminated in a root certificate
which is not trusted by the trust provider.
I tried just copying the created cert into both my user and the machine trusted publishers with no luck.
Google gives me: https://4sysops.com/archives/sign-your-powershell-scripts-to-increase-security/
and the like but they're all needing to install the Windows 10 SDK.
I'm just trying to run https://community.spiceworks.com/scripts/show/2998-adamj-clean-wsus?page=51 on my Server 2016 WSUS server without polluting it any more than necessary, but I can't change the Group Policy of needing powershell scripts to be AllSigned.
Help?