Prerequisites
Summary
When reviewing the output for dsc resource list, I noticed that the Microsoft.Windows/Registry resource isn't reported as having the whatIf capability even though both the set and delete operations explicitly support what-if mode in the manifest.
This seems to be because the load_resource_manifest function doesn't check the manifest for what-if functionality unlike the other capabilities. To fix this bug, we would need to update the function to correctly detect what-if support for the resource.
Steps to reproduce
-
Invoke the following command on a Windows machine:
dsc resource list Microsoft.Windows/Registry --output-format yaml
-
Review the output to see that the capabilities field doesn't include whatIf.
Expected behavior
dsc resource list Microsoft.Windows/Registry --output-format yaml |
ConvertFrom-Json |
Select-Object -ExpandProperty capabilities
get
set
whatIf
delete
Actual behavior
dsc resource list Microsoft.Windows/Registry --output-format yaml |
ConvertFrom-Json |
Select-Object -ExpandProperty capabilities
get
set
delete
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.1
PSEdition Core
GitCommitId 7.6.1
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
latest main ( commit 9288f0c2200d95e8c9e58153f374d8b8182a33b3)
Visuals
No response
Prerequisites
Summary
When reviewing the output for
dsc resource list, I noticed that theMicrosoft.Windows/Registryresource isn't reported as having thewhatIfcapability even though both thesetanddeleteoperations explicitly support what-if mode in the manifest.This seems to be because the
load_resource_manifestfunction doesn't check the manifest for what-if functionality unlike the other capabilities. To fix this bug, we would need to update the function to correctly detect what-if support for the resource.Steps to reproduce
Invoke the following command on a Windows machine:
Review the output to see that the
capabilitiesfield doesn't includewhatIf.Expected behavior
Actual behavior
Error details
Environment data
Version
latest main ( commit
9288f0c2200d95e8c9e58153f374d8b8182a33b3)Visuals
No response