Closed ghost closed 3 years ago
Thanks for spotting this. No this is a.mistake as it should be included already. Can you please confirm which version you installed!
Hello, I downloaded the most recent version
the latest :)
Had a quick look and it seems to be there:
Can you try importing in your PowerShell, maybe re-download or re-install (-Force).
That is really strange. It does look like the DSCResource.Common files are included in the package for v8.4.0 (latest release) and v8.4.1-preview0002 (latest preview release).
I'm sorry, i downloaded again but I don't see the version folder (8.4.0)
I was able to download the 8.4 version from PowerShell gallery! :)
So if you do a git clone it won't be there as those are the source file (in your screenshot above).
Indeed, to use the module you ought to get it from the PowerShellGallery, either via the Web or using Install-Module ComputerManagementDsc.
Hello,
I recently downloaded ComputerManagementDsc to utilize PendingReboot resource but I am getting the following error message when I try to import-dscresource
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ComputerManagementDsc\Modules\DscResource.Common' was not loaded because no valid module file was found in any module directory. LCM failed to start desired state configuration manually.
I don't see the DscResource.Common file in the package I downloaded, is this a file I need to download separately?
ComputerManagementDsc.Common.psm1 file: $modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
I see the two lines above in the ComputerManagementDsc.Common.psm1 file, when we import-module shouldn't we put .psm1? like below? Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')