PowerShell / PSDesiredStateConfiguration

Source for https://www.powershellgallery.com/packages/PSDesiredStateConfiguration module
MIT License
58 stars 14 forks source link

Get-DscResource' command was found in the module 'PSDesiredStateConfiguration', but the module could not be loaded. #111

Open raband-cdw opened 1 year ago

raband-cdw commented 1 year ago

Prerequisites

Steps to reproduce

Using a windows sandbox environment (so a fresh DSC install) I ran the following using an administrative PowerShell window.

Install-Module -Name Microsoft365DSC Import-Module Microsoft365DSC Update-M365DSCDependencies Export-M365DSCConfiguration

I use the credential option and use a admin account that doesn't have MFA enabled. I get a few graph permission errors but I'm not too worried about that at this point.

once I get to the exodkimsigning config I get this message and the export stops: image

I attempt to import the module ad directed and I get the following error: image

Expected behavior

complete configuraiton export

Actual behavior

partial configuration export

Error details

Import-Module : Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredSt
ateConfiguration\Microsoft.Windows.DSC.CoreConfProviders' or one of its dependencies. The system cannot find the file
specified.
At line:1 char:1
+ Import-Module PSDesiredStateConfiguration -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Environment data

5.1.22621.963

Version

N/A

Visuals

No response