Hi!
I have a real strange ‘Problem’ with an internal PSRepository and one module that I am publishing.
The Repository is a fileshare on our 2016 Windows Server FileServer.
I publish the module with the parameter (I will remove the companyName from the values and replace it with ‘Module’)
Publish-Module -Name Module.SCCM -Repository "ModulePSRepository"
It gets published and everything is fine. I can find the module again and install it with “Find-Module” and “Install-Module”. It works from all the servers that need to install it.
The strange thing that I experience however is when I browse to the fileshare I cannot find the actual module files. It’s empty. All that I can find is the .nupkg file (Module.SCCM.0.0.2.nupkg), but the actual module folder does not exist at all.
If I try to publish it again I obviously get an error message saying module already exists. If I delete the .nupkg file I can upload it again, but I get the same result.
I’ve uploaded 4 other modules and I can see them together with their .nupkg files.
This is the VERBOSE output of the publish that I am doing. (I have replaced the actual servername)
VERBOSE: Repository details, Name = 'ModulePSRepository', Location = '\\servername\ModulePSRepository$'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Repository details, Name = 'ModulePSRepository', Location = '\\servername\ModulePSRepository$'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Publish Location:'\\servername\ModulePSRepository$'. VERBOSE: Module 'Module.SCCM' was found in 'C:\Program Files\WindowsPowerShell\Modules\Module.SCCM\0.0.2'. VERBOSE: Populating RepositorySourceLocation property for module Module.SCCM. VERBOSE: Loading module from path 'C:\Users\cadminthn\AppData\Local\Temp\1049968130\Module.SCCM\Module.SCCM.psm1'. VERBOSE: Repository details, Name = 'ModulePSRepository', Location = '\\servername\ModulePSRepository$'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: Using the specified source names : 'ModulePSRepository'. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is '\\servername\ModulePSRepository$' and PackageManagementProvider is 'NuGet'. VERBOSE: Total package yield:'0' for the specified package 'Module.SCCM'. VERBOSE: Repository details, Name = 'ModulePSRepository', Location = '\\servername\ModulePSRepository$'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: Using the specified source names : 'ModulePSRepository'. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is '\\servername\ModulePSRepository$' and PackageManagementProvider is 'NuGet'. VERBOSE: Total package yield:'0' for the specified package 'Module.SCCM'. VERBOSE: Performing the operation "Publish-Module" on target "Version '0.0.2' of module 'Module.SCCM'". VERBOSE: Successfully published module 'Module.SCCM' to the module publish location '\\servername\ModulePSRepository$'. Please allow few minutes for 'Module.SCCM' to show up in the search results.
What am I missing?