Make a role with this desired configuration
Ensure-PsRepository
(
Exists: true,
InstallationPolicy: trusted,
SourceLocation: https://www.powershellgallery.com/api/v2,
Name: PSGallery
);
Assign the role to the server
Remediate
Et voilà 
This should work
Cheers
PhilippeC.







