Kae Travis

Publish-PSArtifactUtility Failed to Publish Module

Tags:

I was publishing a module to the PowerShell gallery recently, and stumbled across an issue resulting in Publish-PSArtifactUtility Failed to Publish Module.

It was my free MSIX Packaging Tool that I was struggling to publish, and the full PowerShell error message was:

Publish-PSArtifactUtility : Failed to publish module ‘MyModule’: ‘The request was aborted: Could not create SSL/TLS secure channel’.

It turns out the issue was because it was using Nuget.exe version 2.8 in this location: C:\ProgramData\Microsoft\Windows\Powershell\PowerShellGet\ (note that the Powershell\PowerShellGet\ location only gets created after running Publish-Module)

Simply downloading a newer version such as Nuget version 4.6.2 and overwriting the version in C:\ProgramData\Microsoft\Windows\Powershell\PowerShellGet\ fixed the issue.

Publish-PSArtifactUtility Failed to Publish Module
Publish-PSArtifactUtility Failed to Publish Module

Leave a Reply