Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-M365DSCModule fails to update Microsoft365DSC to the latest version #5604

Open
rick-engle opened this issue Jan 6, 2025 · 4 comments

Comments

@rick-engle
Copy link

Description of the issue

I am on version 1.24.1211.1 and want to upgrade to the latest release, 1.24.1218.1. But the update seems to terminate in the process.

Get-Module Microsoft365DSC -ListAvailable | Select-Object ModuleBase, Version

ModuleBase Version


C:\Users\ricke\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1 1.24.1211.1

PS C:\WINDOWS\system32> Update-M365DSCModule
Checking Microsoft.Graph.Authentication

That is as far as it gets. And the version is NOT updated.

Microsoft 365 DSC Version

1.24.1211.1

Which workloads are affected

Security & Compliance Center

The DSC configuration

Just the currently installed Microsoft365DSC package.

Verbose logs showing the problem

Get-Module Microsoft365DSC -ListAvailable | Select-Object ModuleBase, Version

ModuleBase                                                                             Version    
----------                                                                             -------    
C:\Users\ricke\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1 1.24.1211.1

PS C:\WINDOWS\system32> Update-M365DSCModule
Checking Microsoft.Graph.Authentication

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.26100.2161
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.26100.2161
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
@CovidtheDog2024
Copy link

Hi @rick-engle.

Please try the following steps.

Update-Module Microsoft365DSC
Close and open Powershell
Update-M365DSCDependencies
Close and open Powershell
Uninstall-M365DSCOutdatedDependencies

@FabienTschanz
Copy link
Contributor

@rick-engle Seems like Microsoft365DSC is installed in the current user session. Please run the command in an elevated prompt and try again. You might need to first uninstall it before it can be installed with the elevated prompt.

@CovidtheDog2024 Update-M365DSCModule does all that and a bit more, so no need to do it manually.

@rick-engle
Copy link
Author

@FabienTschanz I'm already running PowerShell ISE as an elevated process. What is the proper way to uninstall Microsoft365DSC? This command does not work:
Uninstall-Module -Name Microsoft365DSC -AllVersions -Force

PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names 'Microsoft365DSC'.

@FabienTschanz
Copy link
Contributor

@rick-engle Try to uninstall it from a standard PowerShell session and the installation from an elevated one. Otherwise, simply delete the directory in your Documents folder (that's ultimately what Uninstall-Module does). If you have any other modules installed in the Documents folder, you can remove them as well since we want them in the C:\Program Files... directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants