Problems publishing module to local repository

2 views
Skip to first unread message

Mike Leone

unread,
Oct 21, 2025, 12:47:50 PMOct 21
to NTPowershell Mailing List
Today seems to be my day for arguing with Powershell. LOL

So we use Nutanix here, and they have their own PS modules. Ordinarily, they provide these via a download link on their web interface to your environment. Unfortunately, there's a bug in the version provided by our environment, and we are not at a place where we can implement the update to the Nutanix environment, so we can get the newest PS modules.

And we usually block internet access to the PSGallery, where I could install the latest ones I need,

No problem, I figure, I'll just download them elsewhere, and import them that way. That was fine, and fixed my issue. Then I have my brain storm, and I figure "Hey, I'll add them to that local PSRepository I set up years ago, so my co-workers won't have this aggravation, they can just install from there".

Uh huh. LOL

Now, I know my Repository is there, trusted and registered, etc. I did have to change all the "locations" properties when we moved the repo from one server to another".

PS P:\software\PHA Scripts> Get-PSRepository -Name $LocalRepoName | fl

Name                      : PHA Internal PSRepository
SourceLocation            : \\DC1FIL020\netadmin\PHA_PS_Internal_Repository
Trusted                   : True
Registered                : True
InstallationPolicy        : Trusted
PackageManagementProvider : NuGet
PublishLocation           : \\DC1FIL020\netadmin\PHA_PS_Internal_Repository
ScriptSourceLocation      : \\DC1FIL020\netadmin\PHA_PS_Internal_Repository
ScriptPublishLocation     : \\DC1FIL020\netadmin\PHA_PS_Internal_Repository
ProviderOptions           : {}

So now I am trying to publish the modules there, and ...

PS P:\software\PHA Scripts> Publish-Module -Path "E:\Temp\NutanixModules\Nutanix.Prism.Common" -Repository $LocalRepoName
Write-Error: Failed to generate the compressed file for module 'C:\Program Files\dotnet\dotnet.exe failed to pack: error  '.
PS P:\software\PHA Scripts>

Not sure why I am getting the error to fail to pack. I checked the security on the folder where the Repository lives, and I have all access there. Green check marks across the board.

Any ideas where to poke at next? I mean, I'm just trying to have any 3rd party modules available in a repository, in case I need to execute a script from somewhere that doesn't already have them loaded (which can happen more often than you might think ...)

Thanks


--

Mike. Leone, <mailto:tur...@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

Wright, John M

unread,
Oct 21, 2025, 1:59:56 PMOct 21
to ntpowe...@googlegroups.com

Just a shot in the dark but have you checked the nuget version or tried updating it?

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Mike Leone
Sent: Tuesday, October 21, 2025 12:48 PM
To: NTPowershell Mailing List <ntpowe...@googlegroups.com>
Subject: [ntpowershell] Problems publishing module to local repository

 

EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.

Secured by Check Point

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BhASatpwM4aTyNawpgZiHBXXauScLy%2Byv_zAL550p0tFw%40mail.gmail.com.

Mike Leone

unread,
Oct 21, 2025, 2:08:47 PMOct 21
to ntpowe...@googlegroups.com
On Tue, Oct 21, 2025 at 1:59 PM Wright, John M <John....@newvista.org> wrote:

Just a shot in the dark but have you checked the nuget version or tried updating it?


Haven't checked it. Didn't think about it, actually. This is Powershell v7, these modules only work with v7. The repository was originally created using PS v5.1. Haven't added to that repository with v7 yet, I'm just now getting around to using v7.

Mike Leone

unread,
Oct 21, 2025, 2:15:38 PMOct 21
to ntpowe...@googlegroups.com
On Tue, Oct 21, 2025 at 1:59 PM Wright, John M <John....@newvista.org> wrote:

Just a shot in the dark but have you checked the nuget version or tried updating it?


This is what I see in PS v5.1

PS P:\software\PHA Scripts> Get-PackageProvider -Name NuGet -ListAvailable | Select-Object Name, Version

Name  Version
----  -------
NuGet 3.0.0.1
nuget 2.8.5.208

This is what I see when using PS v7 (where I am trying to publish a new module):

PS P:\software\PHA Scripts> Get-PackageProvider -Name NuGet -ListAvailable | Select-Object Name, Version

Name  Version
----  -------
NuGet 3.0.0.1


 

Mike Leone

unread,
Oct 21, 2025, 2:21:27 PMOct 21
to ntpowe...@googlegroups.com
On Tue, Oct 21, 2025 at 1:59 PM Wright, John M <John....@newvista.org> wrote:

Just a shot in the dark but have you checked the nuget version or tried updating it?


PS v5.1:

PS P:\software\PHA Scripts> Get-PackageProvider -Name NuGet -ListAvailable | Select-Object Name, Version, ProviderPath

Name  Version   ProviderPath
----  -------   ------------
NuGet 3.0.0.1   C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.8.1\fullclr\Microsoft.PackageManage...
nuget 2.8.5.208 C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208\Microsoft.PackageManagement.Nu...

 
Reply all
Reply to author
Forward
0 new messages