microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.61k stars 501 forks source link

EXOMalwareFilterPolicy Attribute EnableInternalSenderNotifications can't be found but it is provided in MOF file #2025

Closed atdheekurteshi closed 2 years ago

atdheekurteshi commented 2 years ago

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

EXOMalwareFilterPolicy AttributeKey : EnableInternalSenderNotifications can't be found but it was provided.

When I run the following commands in the Power-Shell for EXOMalwareFilterPolicy : I got that the AttributeKey : EnableInternalSenderNotifications can't be found.

PS C:\Windows\system32> Publish-DscConfiguration -Path C:\Users\UserName\Downloads\m365automationnew\MOFs\MainConfig -Force -Verbose
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: Vom Computer '' mit Benutzer-SID '' ist ein LCM-Methodenaufruf eingegangen.
VERBOSE: []: LCM:  [ StartenFestlegen]
VERBOSE: []: LCM:  [ BeendenFestlegen]     Das Konfigurationsdokument wurde im Speicher für partielle Konfigurationen gespeichert.
VERBOSE: []: LCM:  [ BeendenFestlegen]
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Publish-DscConfiguration finished in 0.191 seconds.
PS C:\Windows\system32> Start-DscConfiguration -UseExisting -Force -Verbose -Wait
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ApplyConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: Vom Computer '' mit Benutzer-SID '' ist ein LCM-Methodenaufruf eingegangen.
VERBOSE: []:                            [] Das Konsistenzmodul wird gestartet.
VERBOSE: []: LCM:  [ StartenRessource]  [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a]
VERBOSE: []: LCM:  [ StartenTesten   ]  [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a]
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Testing configuration of MalwareFilterPolicy for Default
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Getting configuration of MalwareFilterPolicy for Default
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Found MalwareFilterPolicy Default
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Get-TargetResource Result:
 Action=DeleteMessage; AdminDisplayName=; ApplicationId=***; CertificatePassword=$null; CertificatePath=***; CertificateThumbprint=; Credential=$null; CustomAlertText=; CustomExternalBody=; CustomExternalSubject=; CustomFromAddress=; CustomFromName=; CustomInternalBody=; CustomInternalSubject=; CustomNotifications=False;
 EnableExternalSenderAdminNotifications=False; EnableExternalSenderNotifications=False; EnableFileFilter=False; EnableInternalSenderAdminNotifications=False; EnableInternalSenderNotifications=True; Ensure=Present; ExternalSenderAdminAddress=; FileTypes=$null; Identity=Default; InternalSenderAdminAddress=; MakeDefault=True;
QuarantineTag=NotificationEnabledPolicy; TenantId=***; ZapEnabled=True
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Current Values: Action=DeleteMessage; AdminDisplayName=; ApplicationId=***; CertificatePassword=$null; CertificatePath=***; CertificateThumbprint=; Credential=$null; CustomAlertText=;
CustomExternalBody=; CustomExternalSubject=; CustomFromAddress=; CustomFromName=; CustomInternalBody=; CustomInternalSubject=; CustomNotifications=False; EnableExternalSenderAdminNotifications=False; EnableExternalSenderNotifications=False; EnableFileFilter=False; EnableInternalSenderAdminNotifications=False; EnableInternalSenderNotifications=True;
Ensure=Present; ExternalSenderAdminAddress=; FileTypes=$null; Identity=Default; InternalSenderAdminAddress=; MakeDefault=True; QuarantineTag=NotificationEnabledPolicy; TenantId=***; ZapEnabled=True
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Target Values: Action=DeleteAttachmentAndUseDefaultAlert; ApplicationId=***; CertificateThumbprint=; EnableInternalSenderNotifications=False; Ensure=Present; Identity=Default;
QuarantineTag=NotificationEnabledPolicy; TenantId=***; Verbose=True
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Test-TargetResource returned False
VERBOSE: []: LCM:  [ BeendenTesten   ]  [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a]  in 24.9060 Sekunden.
VERBOSE: []: LCM:  [ StartenFestlegen]  [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a]
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Setting configuration of MalwareFilterPolicy for Default
VERBOSE: []:                            [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a] Setting MalwareFilterPolicy Default with values: Action=DeleteAttachmentAndUseDefaultAlert; EnableInternalSenderNotifications=False; Identity=Default; QuarantineTag=NotificationEnabledPolicy; Verbose=True
Es wurde kein Parameter gefunden, der dem Parameternamen "EnableInternalSenderNotifications" entspricht.
    + CategoryInfo          : InvalidArgument: (:) [], CimException
    + FullyQualifiedErrorId : NamedParameterNotFound,Set-MalwareFilterPolicy
    + PSComputerName        : localhost

VERBOSE: []: LCM:  [ BeendenFestlegen]  [[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a]  in 1.1100 Sekunden.
Die PowerShell DSC-Ressource "[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a" mit SourceInfo "::10::3::EXOMalwareFilterPolicy" hat beim Ausführen der Funktion "Set-TargetResource" mindestens einen Fehler ohne Abbruch ausgegeben. Diese Fehler werden im ETW-Kanal namens "Microsoft-Windows-DSC/Operational" protokolliert. Weitere
Informationen finden Sie in diesem Kanal.
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
    + PSComputerName        : localhost

VERBOSE: []:                            [] Die Konsistenzprüfung ist abgeschlossen.
Mindestens eine der partiellen Konfigurationen konnte nicht angewendet werden. Es konnte keine Konfiguration erstellt werden.  Der lokale Konfigurations-Manager (LCM) konnte Desired State Configuration nicht manuell starten.
    + CategoryInfo          : ObjectNotFound: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 6
    + PSComputerName        : localhost

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 26.857 seconds

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

MOF file extract:

/*
@TargetNode=''
@GeneratedBy=
@GenerationDate=06/24/2022 12:01:42
@GenerationHost=
*/

instance of MSFT_EXOMalwareFilterPolicy as $MSFT_EXOMalwareFilterPolicy1ref
{
ResourceID = "[EXOMalwareFilterPolicy]Container-38-c9b374ae-9671-4d1c-99b2-222a9d15465a";
 Action = "DeleteAttachmentAndUseDefaultAlert";
 CertificateThumbprint = "";
 Ensure = "Present";
 ApplicationId = "";
 SourceInfo = "::10::3::EXOMalwareFilterPolicy";
 TenantId = "";
 Identity = "Default";
 ModuleName = "Microsoft365DSC";
 QuarantineTag = "NotificationEnabledPolicy";
 EnableInternalSenderNotifications = True;
 ModuleVersion = "1.22.622.1";

 ConfigurationName = "MainConfig";

};
instance of OMI_ConfigurationDocument

                    {
 Version="2.0.0";

                        MinimumCompatibleVersion = "1.0.0";

                        CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};

                        Author="";

                        GenerationDate="06/24/2022 12:01:42";

                        GenerationHost="";

                        Name="MainConfig";

                    };
#### The operating system the target node is running
<!--
    Please provide as much as possible about the target node, for example
    edition, version, build and language.
    On OS with WMF 5.1 the following command can help get this information.

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US, de-DE}

-->

#### Version of the DSC module that was used ('dev' if using current dev branch)
1.22.622.1
malauter commented 2 years ago

EnableInternalSenderNotifications parameter is only available in onprem Exchange. I will remove this parameter to fix this bug.