Skip to content

Instantly share code, notes, and snippets.

@gitfvb
Last active June 16, 2025 16:32
Show Gist options
  • Save gitfvb/f4691ff5ac0bc55826bdfb8179d4b953 to your computer and use it in GitHub Desktop.
Save gitfvb/f4691ff5ac0bc55826bdfb8179d4b953 to your computer and use it in GitHub Desktop.
Problems with publishing powershell modules and scripts

Steps to solve.

  • Remove all 1.0.0.1 packages (also x86) from PowerShellGet and PackageManagement module folders
  • Replace nuget.exe in C:\Users\<username>\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet
  • Install a current .NET SDK
  • When using a German OS, replace this line in C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1
  • Possibly avoid VPN connection for publishing
    #$stdOut -match "Successfully created package '(.*.nupkg)'" | Out-Null

with this one

    $stdOut -match 'Das Paket "(.*.nupkg)" wurde erfolgreich erstellt.' | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment