raandree / DscConfig.M365

DSC Composite Resources for DscWorkshop blueprint
MIT License
1 stars 3 forks source link

Use PowerShell 5 to Build and Test #25

Open dan-hughes opened 3 months ago

dan-hughes commented 3 months ago

Problem description

I ran into the following issue which is resolved by using PS5. microsoft/Microsoft365DSC#2054

Verbose logs

PowerShell 7 error: `Configuration: Cannot process argument transformation on parameter 'ResourceModuleTuplesToImport'. Cannot convert the "System.Collections.ArrayList" value of type "System.Collections.ArrayList" to type "System.Tuple`3[System.String[],Microsoft.PowerShell.Commands.ModuleSpecification[],System.Version]".`

How to reproduce

Manually compile the following.

Configuration MyConfig {

    Import-DscResource -ModuleName Microsoft365DSC

    Node localhost {

        TeamsClientConfiguration Config {
            Identity                         = 'Global'
            AllowBox                         = $true
            AllowDropBox                     = $true
            AllowEmailIntoChannel            = $true
            AllowGoogleDrive                 = $true
            AllowGuestUser                   = $true
            AllowOrganizationTab             = $true
            AllowResourceAccountSendMessage  = $true
            AllowScopedPeopleSearchandAccess = $true
            AllowShareFile                   = $true
            AllowSkypeBusinessInterop        = $true
            AllowEgnyte                      = $true
            ContentPin                       = "RequiredOutsideScheduleMeeting"
            ResourceAccountContentAccess     = "NoAccess"
        }
    }
}

Expected behavior

Resource should compile

Current behavior

Resource fails to compile

Suggested solution

Move build and test pipeline to PS5.

Operating system the target node is running

N/A

PowerShell version and build the target node is running

N/A

Module version used

N/A
dan-hughes commented 2 months ago

@raandree ran into a resource that does not compile with PS7.