Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

PowerShellGallery not updating index, cannot install latest version with ModuleFast

Open ricmestre opened this issue 1 year ago • 10 comments

Description of the issue

I finally started my tests with a more recent version of M365DSC in my local machine, but when I tried to use the latest version through DevOps where I install it via ModuleFast it errors out, same thing happens with ReverseDSC, unless I use an older version.

After troubleshooting it looks like the json index is not being updated so ModuleFast cannot see past the versions that are listed below, could you please check why this is happening and when can it be fixed?

https://pwsh.gallery/registration/microsoft365dsc/index.json -> 1.25.723.1 https://pwsh.gallery/registration/reversedsc/index.json -> 2.0.0.28

Microsoft 365 DSC Version

1.25.730.1

Which workloads are affected

other

The DSC configuration

N/A

Verbose logs showing the problem

##[error]Install-ModuleFast : Microsoft365Dsc(1.25.730.1): a matching module was not found in the https://pwsh.gallery/index.json repository that satisfies the requested version constraints. You may need to specify -PreRelease or adjust your version constraints.
At D:\a\_work\1\s\Source\Scripts\InstallM365DscAndDependencies.ps1:73 char:5
+     Install-ModuleFast @Parameters

Environment Information + PowerShell Version

Win11/PS5.1

ricmestre avatar Aug 06 '25 10:08 ricmestre

@NikCharlebois Any news regarding this issue? It's still ongoing.

ricmestre avatar Aug 11 '25 12:08 ricmestre

Maybe we have to wait for another release? I don't really know why that is.

FabienTschanz avatar Aug 11 '25 21:08 FabienTschanz

ReverseDSC is just 1 release behind, but M365DSC it's already 3, not expecting that just by creating yet another release will fix this issue.

ricmestre avatar Aug 11 '25 21:08 ricmestre

I first noticed this with 1.25.723.2. I thought it might be a ".2" thing and thought I'd wait for the next release.

martincaddick avatar Aug 12 '25 06:08 martincaddick

I've noticed this too, might be an issue on the pwsh.gallery end, since M365dsc.compositeresources from Yorick won't update to the newer versions too when using 'latest'

even downloading like this doesn't work : https://pwsh.gallery/flatcontainer/az.accounts/5.2.0/az.accounts.5.2.0.nupkg

JIO-CIPP avatar Aug 14 '25 05:08 JIO-CIPP

I will check with the PS Gallery team.

ykuijs avatar Sep 02 '25 10:09 ykuijs

@ykuijs Thanks Yorick!

ricmestre avatar Sep 05 '25 14:09 ricmestre

I think I have a similar issue:

2025-09-09 14:02:22 [FAILURE] Install-DSCModulePrereqs: Error occurred during download: ExchangeOnlineManagement(3.9.0): a matching module was not found in the https://pwsh.gallery/index.json repository that satisfies the requested version constraints. You may need to specify -PreRelease or adjust your version constraints. 2025-09-09 14:02:22 [FAILURE] DeployModules.ps1: [ERROR] Unable to retrieve all required modules from PowerShell Gallery

bartvermeersch avatar Sep 09 '25 14:09 bartvermeersch

The index.json now seems to have been updated. Any chance you can check again?

FabienTschanz avatar Oct 02 '25 17:10 FabienTschanz

Yes looks like it's fixed now, closing.

ricmestre avatar Oct 03 '25 07:10 ricmestre