DSC seems to inject "Verbose" key into resource properties, causing an error when "Verbose" is not a property in the DSC resource schema file
I maintainer di solito rispondono entro 2 giorni
@theJasonHelmick ci sta già lavorando.
Dal 22/1/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Summary
Attempting to test deploy a microsoft365DSC resource: "Microsoft365DSC/IntuneDeviceConfigurationPlatformScriptWindows"
Fails with an error stating:
Exception: The PowerShell DSC resource returned results that are not valid from Get-TargetResource.
The Verbose key is not a valid property in the corresponding DSC resource schema file. The results
from Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the same as
the properties in the corresponding DSC resource schema file.
I haven't added the key "Verbose", it seems to be a default behaviour of the adapter that I can't turn off.
Steps to reproduce
-
Write config document, no Verbose key included:
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json resources: - name: Intune Test type: Microsoft.Windows/WindowsPowerShell properties: resources: - name: Test-Intune-Script type: Microsoft365DSC/IntuneDeviceConfigurationPlatformScriptWindows properties: Id: "34cedb35-7569-4d20-acbc-81c12c2d9507" DisplayName: "TestCustomScript" Ensure: "Present" EnforceSignatureCheck: false FileName: "test-dsc.ps1" RunAs32Bit: false RunAsAccount: "system" ScriptContent: "test" ApplicationId: "###" TenantId: "###" CertificateThumbprint: "###" -
Attempt to deploy using:
dsc -l trace config set --file .\test.yml -
Check M365DSC Event Log, sure enough the verbose key appears:
<M365DSCEvent> <ConfigurationDrift Source="MSFT_IntuneDeviceConfigurationPlatformScriptWindows" TenantId="wgadev.onmicrosoft.com"> <ParametersNotInDesiredState> <Param Name="Ensure"><CurrentValue>Absent</CurrentValue><DesiredValue>Present</DesiredValue></Param> <Param Name="Ensure"><CurrentValue>Absent</CurrentValue><DesiredValue>Present</DesiredValue></Param> </ParametersNotInDesiredState> </ConfigurationDrift> <DesiredValues> <Param Name ="DisplayName">TestCustomScript</Param> <Param Name ="EnforceSignatureCheck">False</Param> <Param Name ="FileName">test-dsc.ps1</Param> <Param Name ="RunAs32Bit">False</Param> <Param Name ="RunAsAccount">system</Param> <Param Name ="ScriptContent">test</Param> <Param Name ="Id">34cedb35-7569-4d20-acbc-81c12c2d9507</Param> <Param Name ="Ensure">Present</Param> <Param Name ="ApplicationId">###</Param> <Param Name ="TenantId">###</Param> <Param Name ="CertificateThumbprint">###</Param> <Param Name ="Verbose">True</Param> </DesiredValues> <CurrentValues> <Param Name ="EnforceSignatureCheck">False</Param> <Param Name ="ScriptContent">test</Param> <Param Name ="FileName">test-dsc.ps1</Param> <Param Name ="RunAsAccount">system</Param> <Param Name ="Id">34cedb35-7569-4d20-acbc-81c12c2d9507</Param> <Param Name ="Verbose">True</Param> <Param Name ="ApplicationId">###</Param> <Param Name ="DisplayName">TestCustomScript</Param> <Param Name ="Ensure">Absent</Param> <Param Name ="CertificateThumbprint">###</Param> <Param Name ="RunAs32Bit">False</Param> <Param Name ="TenantId">###</Param> </CurrentValues> </M365DSCEvent>
Expected behavior
dsc -l debug config set --file .\test.yml
results:
- name: Intune Test
type: Microsoft.Windows/WindowsPowerShell
result:
actualState:
output: not sure..
messages: []
hadErrors: false
Actual behavior
NativeErrorCode : TypeMismatch
ErrorData : MSFT_WmiError
MessageId : GetOperationResultInvalidResultFormat
ErrorSource :
ErrorType : 0
StatusCode : 13
Message : The PowerShell DSC resource returned results that are not valid from
Get-TargetResource. The Verbose key is not a valid property in the corresponding
DSC resource schema file. The results from Get-TargetResource must be in a Hashtable
format. The keys in the Hashtable must be the same as the properties in the
corresponding DSC resource schema file.
Data : {}
InnerException :
TargetSite : Void ProcessNativeCallback(Microsoft.Management.Infrastructure.Native.OperationCallbackProcessingContext,
T, Boolean, Microsoft.Management.Infrastructure.Native.MiResult, System.String, Microsoft.Management.
Infrastructure.Native.InstanceHandle)
StackTrace : at Microsoft.Management.Infrastructure.Internal.Operations.CimAsyncObserverProxyBase`1.ProcessNativeCallback
(OperationCallbackProcessingContext callbackProcessingContext, T currentItem,
Boolean moreResults, MiResult operationResult, String errorMessage, InstanceHandle
errorDetailsHandle)
HelpLink :
Source : Microsoft.Management.Infrastructure
HResult : -2146233088
2025-11-28T05:54:26.367258Z ERROR dsc_lib::dscresources::command_resource: 896: PID 31112: Exception:
The PowerShell DSC resource returned results that are not valid from Get-TargetResource. The
Verbose key is not a valid property in the corresponding DSC resource schema file. The results
from Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the
same as the properties in the corresponding DSC resource schema file.
2025-11-28T05:54:26.441405Z DEBUG dsc_lib::dscresources::command_resource: 660: Process 'powershell'
id 31112 exited with code 1
2025-11-28T05:54:26.446813Z ERROR dsc::subcommand: 106: Error: Command: Resource 'powershell'
[exit code 1] manifest description: Error
Error details
2025-11-28T05:45:31.683970Z ERROR dsc_lib::dscresources::command_resource: 896: PID 33424: Exception:
The PowerShell DSC resource returned results that are not valid from Get-TargetResource. The
Verbose key is not a valid property in the corresponding DSC resource schema file. The results
from Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the
same as the properties in the corresponding DSC resource schema file.
2025-11-28T05:45:31.763039Z DEBUG dsc_lib::dscresources::command_resource: 660: Process 'powershell'
id 33424 exited with code 1
2025-11-28T05:45:31.769200Z ERROR dsc::subcommand: 106: Error: Command: Resource 'powershell'
[exit code 1] manifest description: Error
Environment data
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
3.2.0-preview.2
Visuals
No response
- Lingua principale
- Rust
- Stelle
- 526
- Fork
- 76
- Merge medio
- 4g 20h
- PR unite (30g)
- 24
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/DSC
-
Issue-Enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
PowerShell/DSC#1729 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Feature Request: Support dsc functions in executable argsForse già presa @SteveL-MSFT l’ha presa 4 giorni fa. ApertaIssue-Enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
PowerShell/DSC#1722 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Dev-UX Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PowerShell/DSC#1694 ·
I maintainer di solito rispondono entro 2 giorni
-
Issue-Enhancement Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
PowerShell/DSC#1683 · 5 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Issue-Enhancement Needs Triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PowerShell/DSC#1673 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di PowerShell/DSC
Issue simili
-
area: dogs area: lookout bug security
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 2 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
OpenDevicePartnership/ina4230#31 ·
I maintainer di solito rispondono entro 1 giorno
-
area:breg criticality:p3 documentation triage:needs-implementation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
registrystack/registry-stack#1713 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
posit-dev/ggsql#565 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno