Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntuneDeviceConfigurationPolicyWindows10: Resource is created but with errors #2581

Closed
ricmestre opened this issue Nov 23, 2022 · 0 comments · Fixed by #2582 or #2584
Closed

IntuneDeviceConfigurationPolicyWindows10: Resource is created but with errors #2581

ricmestre opened this issue Nov 23, 2022 · 0 comments · Fixed by #2582 or #2584

Comments

@ricmestre
Copy link
Contributor

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

If a IntuneDeviceConfigurationPolicyWindows10 resource is added to a DSC config file without property DefenderDetectedMalwareActions defined, then it will be created with errors. Subsequent runs will not complain since the problem is only when creating, the errors are as per below.

Verbose logs showing the problem

VERBOSE: [REDACTED]: [[IntuneDeviceConfigurationPolicyWindows10]65ef5623-db0a-46cb-8f01-9069d8a610c4]Creating new Device Configuration Policy {Windows 10/11 - Device Restrictions - Start Menu}
You cannot call a method on a null-valued expression.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : InvokeMethodOnNull
+ PSComputerName : localhost
VERBOSE: [REDACTED]: [[IntuneDeviceConfigurationPolicyWindows10]65ef5623-db0a-46cb-8f01-9069d8a610c4]POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations/6edc8ae5-b1a9-4664-aa6a-9ddb565c690b/assign with 928-byte payload
VERBOSE: [REDACTED]: [[IntuneDeviceConfigurationPolicyWindows10]65ef5623-db0a-46cb-8f01-9069d8a610c4]received 0-byte response of content type
VERBOSE: [REDACTED]: LCM: [ End Set ] [[IntuneDeviceConfigurationPolicyWindows10]65ef5623-db0a-46cb-8f01-9069d8a610c4]in 2.7080 seconds.
The PowerShell DSC resource '[IntuneDeviceConfigurationPolicyWindows10]65ef5623-db0a-46cb-8f01-9069d8a610c4' with SourceInfo
'C:\dsc5\M365Configuration.ps1::15::9::IntuneDeviceConfigurationPolicyWindows10' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to
the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost

Suggested solution to the issue

Only add DefenderDetectedMalwareActions as AdditionalProperties if it is present

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

DSC config is too big, but it fails if it doesn't have property DefenderDetectedMalwareActions defined

The operating system the target node is running

Windows 10

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

dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant