So I have a winget config file, here is everything but the problem block omitted:
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: xPSDesiredStateConfiguration/xWindowsOptionalFeature
id: Microsoft-Hyper-V-All
directives:
description: Enable Microsoft-Hyper-V-All
allowPrerelease: true
settings:
Name: Microsoft-Hyper-V-All
Ensure: Present
configurationVersion: 0.2.0
When I run this config file, I get the following error:
The configuration unit failed while attempting to test the current system state.
Class not registered
<See the log file for additional details>
Here is what is in the log file:
2024-02-01 08:42:08, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2024-02-01 08:42:08, Info DISM DISM FFU Provider: PID=26824 TID=26600 [C:\] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2024-02-01 08:42:08, Info DISM DISM Imaging Provider: PID=26824 TID=26600 The provider FfuManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
2024-02-01 08:42:08, Info DISM DISM VHD Provider: PID=26824 TID=26600 [C:\] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2024-02-01 08:42:08, Info DISM DISM Imaging Provider: PID=26824 TID=26600 The provider VHDManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
[26824.26600] [0x8007007b] FIOReadFileIntoBuffer:(1456): The filename, directory name, or volume label syntax is incorrect.
[26824.26600] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[26824.26600] [0xc142011c] WIMGetMountedImageHandle:(2910)
2024-02-01 08:42:08, Info DISM DISM WIM Provider: PID=26824 TID=26600 [C:\] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2024-02-01 08:42:08, Info DISM DISM Imaging Provider: PID=26824 TID=26600 The provider WimManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
2024-02-01 08:42:08, Info DISM DISM Imaging Provider: PID=26824 TID=26600 No imaging provider supported CreateDismImage for this path - CGenericImagingManager::CreateDismImage
[26824.26600] [0x8007007b] FIOReadFileIntoBuffer:(1456): The filename, directory name, or volume label syntax is incorrect.
[26824.26600] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[26824.26600] [0xc142011c] WIMGetMountedImageHandle:(2910)
2024-02-01 08:42:08, Info DISM DISM WIM Provider: PID=26824 TID=26600 [C:\] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2024-02-01 08:42:08, Info DISM DISM FFU Provider: PID=26824 TID=26600 [C:\] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2024-02-01 08:42:08, Info DISM DISM VHD Provider: PID=26824 TID=26600 [C:\] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 physical location path: C:\ - CDISMManager::CreateImageSession
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 Event name for current DISM session is Global\{5855B61F-D107-4986-A392-792D2EC8E1FC} - CDISMManager::CheckSessionAndLock
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 Create session event 0x12f4 for current DISM session and event name is Global\{5855B61F-D107-4986-A392-792D2EC8E1FC} - CDISMManager::CheckSessionAndLock
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2024-02-01 08:42:08, Info DISM DISM Manager: PID=26824 TID=26600 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation
2024-02-01 08:43:15, Error DISM DismHostLib: Failed to create DismHostManager remote object. Checking for dismhost.exe exit code.
2024-02-01 08:43:15, Info DISM DismHostLib: dismhost.exe is still running. Returning previous error.
2024-02-01 08:43:15, Error DISM DISM Manager: PID=26824 TID=26600 Failed to create Dism Image Session in host. - CDISMManager::LoadRemoteImageSession(hr:0x80040154)
2024-02-01 08:43:15, Warning DISM DISM Manager: PID=26824 TID=26600 A problem ocurred loading the image session. Retrying... - CDISMManager::CreateImageSession(hr:0x80040154)
2024-02-01 08:43:15, Info DISM DISM Manager: PID=26824 TID=26600 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2024-02-01 08:43:15, Info DISM DISM Manager: PID=26824 TID=26600 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation
2024-02-01 08:44:22, Error DISM DismHostLib: Failed to create DismHostManager remote object. Checking for dismhost.exe exit code.
2024-02-01 08:44:22, Info DISM DismHostLib: dismhost.exe is still running. Returning previous error.
2024-02-01 08:44:22, Error DISM DISM Manager: PID=26824 TID=26600 Failed to create Dism Image Session in host. - CDISMManager::LoadRemoteImageSession(hr:0x80040154)
2024-02-01 08:44:22, Error DISM DISM Manager: PID=26824 TID=26600 Failed to load the image session from location: C:\Windows\System32\Dism - CDISMManager::CreateImageSession(hr:0x80040154)
2024-02-01 08:44:22, Error DISM API: PID=26824 TID=26600 m_pDismManager->CreateImageSession failed - CDismCore::CacheImageSession(hr:0x80040154)
2024-02-01 08:44:22, Error DISM API: PID=26824 TID=26600 InternalExecute failed - CBaseCommandObject::Execute(hr:0x80040154)
2024-02-01 08:44:22, Error DISM API: PID=26824 TID=17716 CAttachPathCommandObject failed - DismOpenSessionInternal(hr:0x80040154)
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Refcount for DismSession= 2s 0 - CSessionTable::RemoveSession
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=26600 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=26600 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=26600 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=26600 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=26600 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Session id is: 2 - DismOpenSessionInternal
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 GetReferenceCount hr: 0x0 - CSessionTable::RemoveSession
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Refcount for DismSession= 1s 0 - CSessionTable::RemoveSession
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Successfully enqueued command object - CCommandThread::EnqueueCommandObject
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=22416 ExecuteLoop: CommandQueue signaled - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=22416 Successfully dequeued command object - CCommandThread::DequeueCommandObject
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=22416 ExecuteLoop: Cancel signaled - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=22416 Leave CCommandThread::ExecuteLoop - CCommandThread::ExecuteLoop
2024-02-01 08:44:22, Info DISM PID=26824 TID=22416 Temporarily setting the scratch directory. This may be overridden by user later. - CDISMManager::FinalConstruct
2024-02-01 08:44:22, Info DISM PID=26824 TID=22416 Scratch directory set to 'C:\Users\devo8\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2024-02-01 08:44:22, Info DISM PID=26824 TID=22416 DismCore.dll version: 10.0.22621.1 - CDISMManager::FinalConstruct
2024-02-01 08:44:22, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=22416 Leave CCommandThread::CommandThreadProcedureStub - CCommandThread::CommandThreadProcedureStub
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Deleted g_internalDismSession - DismShutdownInternal
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 Shutdown SessionTable - DismShutdownInternal
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 DismApi.dll: - DismShutdownInternal
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 DismApi.dll: <----- Ending DismApi.dll session -----> - DismShutdownInternal
2024-02-01 08:44:22, Info DISM API: PID=26824 TID=17716 DismApi.dll: - DismShutdownInternal
I am running this on version 23H2 of Windows 11 Pro.
I have tried using the old module to manage optional features but it gives me the same error message. I am pretty new to desired state configuration and I have tried everything I could find in the documentation Microsoft provided on this subject, but I am all out of ideas.