I am looking for a way to distribute Powershell modules, and trying to use nuget.
I have tested to make a commonstuff.pm1 file. I have make a nuget package as:
put commonstuff.pm1 > Content folder i package
add a install.ps1 in tools
Push:ed the packe to the nugetserver (A internal ProGet server)
The install.ps1 is
$p = $env:PSModulePath.split(';')[0] + "\\commonstuff"
mkdir $p
copy ./commonstuff.pm1 $p
It works fine to run the install.ps1 manually, but running as a nuget package doesn't: it just downloads the package to the current location and that is.
To download i use the command
nuget.exe install commonstuff -Source http://companysvr/nuget/test
I have the latest version of nuget.exe
Is there a recommended way of installing PowerShell modules using nuget? I can't find one.