Install-Package - Run install.ps1


I am trying to execute a powershell script in my nuget (.nupkg) using the install-package cmdlet.

I have a tools folder and have tried both init.ps1 and install.ps1. the nuget package installs but does NOT execute the .ps1.

I was looking for a chocolatey alternative .

Any help would be greatly appreciated!

There aren’t many alternatives to Chocolatey, but Scoop might do what you need. The github page claims “Scoop is also great at handling single-file programs and Powershell scripts.” I haven’t actually used it

Also, do you get any errors when you install or attempt to execute the script? Have you tried doing so with debug output enabled?

I am a big fan of chocolatey. I was looking for a way to execute packages that can execute a .ps1 file with just the install-package cmdlet , no “3rd party” dependencies.

There are no errors , it installs the .nupkg perfectly , it just doesn’t execute the ps1 that it has internally post-install.