PSDesiredStateConfiguration icon indicating copy to clipboard operation
PSDesiredStateConfiguration copied to clipboard

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

Open raband-cdw opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] 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

raband-cdw avatar Apr 26 '23 16:04 raband-cdw