MSFT_EXOHostedContentFilterPolicy - This event indicates that a non-terminating error was thrown when DSCEngine was executing Set-TargetResource on MSFT_EXOHostedContentFilterPolicy DSC resource. FullyQualifiedErrorId is MethodCountCouldNotFindBest. Error Message is Cannot find an overload for "Contains" and the argument count: "1"
It appears that the following resources all fail on the Set-TargetResource with the same exception when using a certificate for authentication. Module version: 1.21.224.1
MSFT_EXODkimSigningConfig MSFT_EXOClientAccessRule MSFT_EXOCASMailboxPlan MSFT_EXOAvailabilityAddressSpace MSFT_EXOAtpPolicyForO365 MSFT_EXOAntiPhishRule MSFT_EXOHostedContentFilterRule MSFT_EXOHostedOutboundSpamFilterPolicy MSFT_EXOInboundConnector MSFT_EXOIntraOrganizationConnector MSFT_EXOMalwareFilterPolicy MSFT_EXOMalwareFilterRule MSFT_EXOOrganizationConfig MSFT_EXOOutboundConnector MSFT_EXOSafeLinksPolicy MSFT_EXOSafeAttachmentPolicy MSFT_EXORemoteDomain (Not fully implemented)
Reviewing the code the issue lies in that a hashtable is set to the PSBoundParameters, removes a few hashtable elements not relative to the EXO cmdlets and then is passed to the EXO cmdlet.
$HostedContentFilterPolicyParams= $PSBoundParameters
$HostedContentFilterPolicyParams.Remove('Ensure') | Out-Null
$HostedContentFilterPolicyParams.Remove('GlobalAdminAccount') | Out-Null
;
;
;
New-HostedContentFilterPolicy @HostedContentFilterPolicyParams
The authentication parameters (not GlobalAdminAccount becuase not used) isn't removed and thus the cmdlets don't recognize the input parameters. By just removing them the code works again for all the above resources.
$HostedContentFilterPolicyParams.Remove('ApplicationId') | Out-Null;
$HostedContentFilterPolicyParams.Remove('CertificateThumbprint') | Out-Null;
$HostedContentFilterPolicyParams.Remove('CertificatePath') | Out-Null;
$HostedContentFilterPolicyParams.Remove('CertificatePassword') | Out-Null;
$HostedContentFilterPolicyParams.Remove('TenantId') | Out-Null;
Any status on the issues (#1101 % #1097)? I provided the fix. Do I need to provide any further information to help with these issues?
I have manually updated all the resources on our multiple machines, but now we cannot update to 1.21.331.1 to address other issues until these fixes get into the release.
Thanks
i still have the issue also with newest version including the fix.
that's the errors
Getting configuration of Office 365 Mailbox Settings for 4d6075ad-9329-11e9-8eb8-1f8237644b42
2021-04-15T10:36:47.2385940Z The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error:
2021-04-15T10:36:47.2387220Z HRESULT 0x80041033
2021-04-15T10:36:47.2388601Z + CategoryInfo : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException
2021-04-15T10:36:47.2390095Z + FullyQualifiedErrorId : HRESULT 0x80041033
2021-04-15T10:36:47.2393680Z + PSComputerName : localhost
2021-04-15T10:36:47.2394475Z
2021-04-15T10:36:47.2394923Z VERBOSE: Operation 'Invoke CimMethod' complete.
2021-04-15T10:36:47.2427741Z VERBOSE: Time taken for configuration job to complete is 864.696 seconds
2021-04-15T10:36:47.2660254Z the following errors occurred during dscconfiguration
2021-04-15T10:36:47.3098029Z The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error:
2021-04-15T10:36:47.3099360Z HRESULT 0x80041033
2021-04-15T10:36:47.3100276Z + CategoryInfo : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException
2021-04-15T10:36:47.3101366Z + FullyQualifiedErrorId : HRESULT 0x80041033
2021-04-15T10:36:47.3102119Z + PSComputerName : localhost
2021-04-15T10:36:47.3103082Z
2021-04-15T10:36:47.3103917Z The PowerShell DSC resource '[EXOHostedContentFilterPolicy]75aa2d74-8c42-4826-89d2-d88da5f4dcf0' with SourceInfo 'C:\Us
2021-04-15T10:36:47.3105135Z ers\cloudadmin.EMASTEST\Downloads\vsts-agent-win-x64-2.184.2_work\1\s\pipelines-scripts\EXO\blueprint\EXO.ps1::258::9:
2021-04-15T10:36:47.3106236Z :EXOHostedContentFilterPolicy' threw one or more non-terminating errors while running the Set-TargetResource
2021-04-15T10:36:47.3107408Z functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this
2021-04-15T10:36:47.3108389Z channel for more details.
2021-04-15T10:36:47.3109328Z + CategoryInfo : InvalidOperation: (:) [], CimException
2021-04-15T10:36:47.3110183Z + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
2021-04-15T10:36:47.3110980Z + PSComputerName : localhost
2021-04-15T10:36:47.3111556Z
2021-04-15T10:36:47.3112266Z Cannot find an overload for "Contains" and the argument count: "1".
2021-04-15T10:36:47.3113170Z + CategoryInfo : NotSpecified: (:) [], CimException
2021-04-15T10:36:47.3113997Z + FullyQualifiedErrorId : MethodCountCouldNotFindBest
2021-04-15T10:36:47.3114786Z + PSComputerName : localhost
2021-04-15T10:36:47.3115412Z
2021-04-15T10:36:47.3116120Z Cannot find an overload for "Contains" and the argument count: "1".
2021-04-15T10:36:47.3117006Z + CategoryInfo : NotSpecified: (:) [], CimException
2021-04-15T10:36:47.3117883Z + FullyQualifiedErrorId : MethodCountCouldNotFindBest
2021-04-15T10:36:47.3118807Z + PSComputerName : localhost
2021-04-15T10:36:47.3119378Z
2021-04-15T10:36:47.3119709Z
2021-04-15T10:36:47.3642634Z Cannot find an overload for "Contains" and the argument count: "1".
2021-04-15T10:36:47.3643688Z At C:\Users\cloudadmin.EMASTEST\Downloads\vsts-agent-win-x64-2.184.2_work_temp\876c3a24-b9b1-43f9-952d-1b381aab2134.p
2021-04-15T10:36:47.3644417Z s1:9 char:2
2021-04-15T10:36:47.3645012Z + throw $error[-1];
2021-04-15T10:36:47.3645395Z + ~~~~~~~~~~~~~~~~
2021-04-15T10:36:47.3645962Z + CategoryInfo : NotSpecified: (:) [], CimException
2021-04-15T10:36:47.3646601Z + FullyQualifiedErrorId : MethodCountCouldNotFindBest
2021-04-15T10:36:47.3647208Z + PSComputerName : localhost
2021-04-15T10:36:47.3647636Z
and config:'
EXOHostedContentFilterPolicy 75aa2d74-8c42-4826-89d2-d88da5f4dcf0 { AddXHeaderValue = ""; AdminDisplayName = ""; AllowedSenderDomains = @(); AllowedSenders = @("[email protected]"); BlockedSenderDomains = @(); BlockedSenders = @(); BulkSpamAction = "Quarantine"; BulkThreshold = 6; DownloadLink = $False; EnableEndUserSpamNotifications = $True; EnableLanguageBlockList = $False; EnableRegionBlockList = $False; EndUserSpamNotificationCustomSubject = ""; EndUserSpamNotificationFrequency = 1; EndUserSpamNotificationLanguage = "Default"; Ensure = "Present"; GlobalAdminAccount = $Credsglobaladmin; HighConfidenceSpamAction = "Quarantine"; Identity = "Default"; IncreaseScoreWithBizOrInfoUrls = "Off"; IncreaseScoreWithImageLinks = "Off"; IncreaseScoreWithNumericIps = "Off"; IncreaseScoreWithRedirectToOtherPort = "Off"; InlineSafetyTipsEnabled = $True; LanguageBlockList = @(); MakeDefault = $True; MarkAsSpamBulkMail = "On"; MarkAsSpamEmbedTagsInHtml = "Off"; MarkAsSpamEmptyMessages = "Off"; MarkAsSpamFormTagsInHtml = "Off"; MarkAsSpamFramesInHtml = "Off"; MarkAsSpamFromAddressAuthFail = "Off"; MarkAsSpamJavaScriptInHtml = "Off"; MarkAsSpamNdrBackscatter = "Off"; MarkAsSpamObjectTagsInHtml = "Off"; MarkAsSpamSensitiveWordList = "Off"; MarkAsSpamSpfRecordHardFail = "On"; MarkAsSpamWebBugsInHtml = "Off"; ModifySubjectValue = ""; PhishSpamAction = "Quarantine"; PhishZapEnabled = $True; QuarantineRetentionPeriod = 30; RedirectToRecipients = @(); RegionBlockList = @(); SpamAction = "MoveToJmf"; SpamZapEnabled = $True; TestModeAction = "None"; TestModeBccToRecipients = @(); }
any ideas?
thank you.
I'll look into it for all the EXO resources in here