This is to try and document the behaviour around PowerShellGet/PSResourceGet code signing publisher behaviour.
The following code can be used to set up this scenario. This must be run as an administrator in Windows PowerShell.
Note: PowerShell uses implicit remoting for the New-SelfSignedCertificate
which breaks the constains serialization. You must run this on Windows PowerShell.