Skip to content

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

Description

@raband-cdw

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions