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

[IntuneAntivirusPolicyWindows10SettingCatalog]: archivemaxdepth and ArchiveMaxSize. Cannot convert the "1" value of type "System.Int32" #5015

Closed
CovidtheDog2024 opened this issue Sep 3, 2024 · 1 comment · Fixed by #5025 or #5132

Comments

@CovidtheDog2024
Copy link

CovidtheDog2024 commented Sep 3, 2024

Description of the issue

Encountering this error while importing the configuration.

PowerShell DSC resource MSFT_IntuneAntivirusPolicyWindows10SettingCatalog failed to execute Test-TargetResource functionality with error message: Cannot process argument transformation on parameter
'archivemaxdepth'. Cannot convert the "7" value of type "System.Int32" to type "System.Management.Automation.ParameterAttribute".

same issue with the parameters ArchiveMaxSize

Microsoft 365 DSC Version

1.24.828.1

Which workloads are affected

Intune

The DSC configuration

IntuneAntivirusPolicyWindows10SettingCatalog "IntuneAntivirusPolicyWindows10SettingCatalog-Testing"
        {
            AllowArchiveScanning                = "1";
            AllowBehaviorMonitoring             = "1";
            AllowCloudProtection                = "1";
            AllowEmailScanning                  = "1";
            AllowFullScanOnMappedNetworkDrives  = "0";
            AllowFullScanRemovableDriveScanning = "1";
            AllowIOAVProtection                 = "1";
            AllowRealtimeMonitoring             = "1";
            AllowScanningNetworkFiles           = "0";
            AllowScriptScanning                 = "1";
            AllowUserUIAccess                   = "1";
            ArchiveMaxDepth                     = 7;
            ArchiveMaxSize                      = 7;
            Assignments                         = @(
                MSFT_DeviceManagementConfigurationPolicyAssignments{
                    deviceAndAppManagementAssignmentFilterType = 'none'
                    groupDisplayName = 'TestGroup'
                    dataType = '#microsoft.graph.groupAssignmentTarget'
                    groupId = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
                }
            );
            AvgCPULoadFactor                    = 50;
            CheckForSignaturesBeforeRunningScan = "1";
            CloudBlockLevel                     = "6";
            CloudExtendedTimeout                = 50;
            Credential                          = $Credscredential;
            DaysToRetainCleanedMalware          = 0;
            Description                         = "";
            DisableCatchupFullScan              = "0";
            DisableCatchupQuickScan             = "0";
            DisplayName                         = "Testing";
            EnableLowCPUPriority                = "1";
            EnableNetworkProtection             = "1";
            Ensure                              = "Present";
            Identity                            = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
            PUAProtection                       = "1";
            RealTimeScanDirection               = "0";
            ScanParameter                       = "2";
            templateId                          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        }

Verbose logs showing the problem

PowerShell DSC resource MSFT_IntuneAntivirusPolicyWindows10SettingCatalog  failed to execute Test-TargetResource functionality with error message: Cannot process argument transformation on parameter 
'archivemaxdepth'. Cannot convert the "7" value of type "System.Int32" to type "System.Management.Automation.ParameterAttribute". 
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.22621.3958
Name  : PSVersion
@CovidtheDog2024 CovidtheDog2024 changed the title Bug in IntuneAntivirusPolicyWindows10SettingCatalog archivemaxdepth and ArchiveMaxSize. Cannot convert the "1" value of type "System.Int32" [IntuneAntivirusPolicyWindows10SettingCatalog]: archivemaxdepth and ArchiveMaxSize. Cannot convert the "1" value of type "System.Int32" Sep 3, 2024
@CovidtheDog2024
Copy link
Author

Thank you, @NikCharlebois This message confirms that the issue has been resolved."

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