dsccommunity / ComputerManagementDsc

DSC resources for for configuration of a Windows computer. These DSC resources allow you to perform computer management tasks, such as renaming the computer, joining a domain and scheduling tasks as well as configuring items such as virtual memory, event logs, time zones and power settings.
https://dsccommunity.org
MIT License
300 stars 83 forks source link

[PendingReboot] DSC_PendingReboot.data.psd1 can't be found in Resource Folder #350

Closed bjornson09 closed 3 years ago

bjornson09 commented 3 years ago

Details of the scenario you tried and the problem that is occurring

I'm using the the DSC_PendingReboot Resource in some configurations. When I tried to apply one configuration on a german ISO I get the Message which I paste in the Verbose logs. Mention: Not only on a German OS but on another Machine with another ISO he looked for [...]ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot**en-GB** He tries to find the DSC_PendingReboot.data.psd1 in the "C:\ProgramFiles\WindowsPowerShell\Modules\ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot\de-DE" Path

Translation of the verbose logs: Import of Module DSC_PendingReboot failed with error the Windows PowerShell datafile DSC_PendingReboot.data.psd1 cant be found in Path "C:\ProgramFiles\WindowsPowerShell\Modules\ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot\de-DE\" or in a higher Directory.

Verbose logs showing the problem

PS C:> Start-DscConfiguration -UseExisting -Wait -Verbose AUSFÜHRLICH: Vorgang "CIM-Methode aufrufen" mit den folgenden Parametern durchführen, "'methodName' = ApplyConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration".
AUSFÜHRLICH: Vom Computer 'DESKTOP-XXXXXXX' mit Benutzer-SID 'MySID' ist ein LCM-Methodenaufruf eingegangen.
AUSFÜHRLICH: [DESKTOP-XXXXXXX]: [] Das Konsistenzmodul wird gestartet.
AUSFÜHRLICH: [DESKTOP-XXXXXXX]: [] Eine ausstehende Konfiguration ist vorhanden. Von DSC wird eine SET-Anforderung für die ausstehende Konfiguration verarbeitet.
AUSFÜHRLICH: [DESKTOP-XXXXXXX]: [] Die Konsistenzprüfung ist abgeschlossen.
Importieren des Moduls DSC_PendingReboot mit Fehler Die Windows PowerShell-Datendatei "DSC_PendingReboot.data.psd1" kann nicht im Verzeichnis "C:\ProgramFiles\WindowsPowerShell\Modules\ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot\de-DE\" oder einem übergeordneten Verzeichnis gefunden werden. fehlgeschlagen. Der lokale Konfigurations-Manager (LCM) konnte Desired State Configuration nicht manuell starten.

Suggested solution to the issue

N/A

The DSC configuration that is used to reproduce the issue (as detailed as possible)

PendingReboot "DisableReboot" { Name = "DisableReboot" DependsOn = "[Script]DisableRebootNodeIfNeeded" SkipCcmClientSDK = $true SkipComponentBasedServicing = $true SkipPendingComputerRename = $true SkipPendingFileRename = $true }

The operating system the target node is running

OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-Bit WindowsVersion : 2004 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : de-DE OsMuiLanguages : {de-DE}

Version and build of PowerShell the target node is running

PSVersion 5.1.19041.610 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.610 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

8.4.0

PlagueHO commented 3 years ago

Thanks for raising this. Didnt mean to close/ reopen. This looks like an issue with the localization code loading. Should not have tried to look for that localization because we've not implemented it.

mgonzcast commented 3 years ago

Thanks for raising this. Didnt mean to close/ reopen. This looks like an issue with the localization code loading. Should not have tried to look for that localization because we've not implemented it.

I am having the same issue with version 8.4.0 with a Spanish ISO. It tries to find the folder:

'C:\Program Files\WindowsPowerShell\Modules\ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot\es-ES\'

I copied the en-US folder under C:\Program Files\WindowsPowerShell\Modules\ComputerManagementDsc\8.4.0\DscResources\DSC_PendingReboot\ and rename it to es-ES and it didn´t complain but unfortunately is not rebooting the machine.

I tried with version 8.1.0 and it doesn´t complain.

PlagueHO commented 3 years ago

Hi @mgonzcast and @bjornson09 - I've found the problem I think - it isn't the language file that is failing to load, it appears to be the data file. I'll fix this, this weekend.