Search notes:

PowerShell cmdLet Publish-Module

nuget.exe is required

PS: 19 C:\> publish-module -path path/to/module -nuGetApiKey ‥

NuGet.exe is required to continue
PowerShellGet requires NuGet.exe to publish an item to the NuGet-based repositories. NuGet.exe must be available in 'C:\ProgramData\Microsoft\Windows\PowerShell\PowerShellGet\' or 'C:\Users\igsnyre\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\, or under one of the paths specified in PATH environment
variable value. NuGet.exe can be downloaded from https://nuget.org/nuget.exe. Do you want PowerShellGet to install NuGet.exe now?

Adding .nuspec

When a module is published, a .nuspec file is added.

Could not create SSL/TLS secure channel

PS: C:\> publish-module -name rene.wsb -NuGetApiKey $env:nugetApiKey
Publish-PSArtifactUtility : Failed to publish module 'Rene.wsb': 'The request was aborted: Could not create SSL/TLS secure channel.
Running the following commands as administrator helped circumvent the above error, after starting a new Powershell session (see here).
install-module PowerShellGet                      -repository PSGallery -force -allowClobber
install-module Microsoft.PowerShell.PSResourceGet -repository PSGallery -force

Failed to generate the compressed file for module 'C:\Program Files\dotnet\dotnet.exe failed to pack: error

After "fixing" the above error, I then got this:
PS: C:\> publish-module -name rene.wsb -NuGetApiKey $env:nugetApiKey
Publish-PSArtifactUtility : Failed to generate the compressed file for module 'C:\Program Files\dotnet\dotnet.exe failed to pack: error
I was able to "fix" this error by executing the following command and then starting a new powershell session.
invoke-webRequest -uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -outFile "$env:LOCALAPPDATA\Microsoft\Windows\PowerShell\PowerShellGet\NuGet.exe"

See also

publish-script
Powershell command noun: module

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/Windows/...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1788390629, '216.73.217.21', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/module/publish(71): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51