I am raising this issue as I'd like to be able to run Lability from Powershell 7.2. Based on my own experimentation the dependency on the PSDesiredStateConfiguration Version 1.1 module seems to be an issue. When running the command Test-LabHostConfiguration I get the following output:
VERBOSE: [2:26:32 PM] Started Lab host configuration test.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\Configuration' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\DifferencingVhd' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\Hotfix' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\Iso' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\ProgramData\Lability\Modules' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\ParentVhd' exists.
VERBOSE: [2:26:32 PM] Testing directory 'C:\Lability\Resources' exists.
VERBOSE: [2:26:32 PM] Importing DSC Resource 'PSDesiredStateConfiguration\MSFT_WindowsOptionalFeature'.
Get-LabDscModule:
Line |
38 | … ourcePath = Get-LabDscModule -ModuleName $ModuleName -ResourceName $R …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'Path' because it is null.
VERBOSE: [2:26:32 PM] Testing node 'Hyper-V role' configuration.
WARNING: [2:26:32 PM] DSC resource 'Test-WindowsOptionalFeatureTargetResource' failed with errror 'The term 'Test-WindowsOptionalFeatureTargetResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.'.
VERBOSE: [2:26:32 PM] Testing 'Test-WindowsOptionalFeatureTargetResource' failed.
False
It appears that the only Dsc resources being used from the PSDesiredStateConfigurationModule Version 1.1 are the MSFT_WindowsOptionalFeature and the MSFT_RoleResource. These should be able to be replaced with the WindowsOptionalFeature and WindowsFeature Dsc resources from the PSDscResources module.
I have only done a limited amount of investigation into the repercussions of making a change like this but some initial testing allowed me to get a lab up and running with Powershell 7.2.
I am raising this issue as I'd like to be able to run Lability from Powershell 7.2. Based on my own experimentation the dependency on the PSDesiredStateConfiguration Version 1.1 module seems to be an issue. When running the command
Test-LabHostConfiguration
I get the following output:It appears that the only Dsc resources being used from the PSDesiredStateConfigurationModule Version 1.1 are the MSFT_WindowsOptionalFeature and the MSFT_RoleResource. These should be able to be replaced with the WindowsOptionalFeature and WindowsFeature Dsc resources from the PSDscResources module.
I have only done a limited amount of investigation into the repercussions of making a change like this but some initial testing allowed me to get a lab up and running with Powershell 7.2.