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

Parsing issue with New-M365DSCReportFromConfiguration #5781

Closed
KuotingChiu opened this issue Feb 14, 2025 · 0 comments · Fixed by #5783, #5811 or #5816
Closed

Parsing issue with New-M365DSCReportFromConfiguration #5781

KuotingChiu opened this issue Feb 14, 2025 · 0 comments · Fixed by #5783, #5811 or #5816

Comments

@KuotingChiu
Copy link

Description of the issue

PS C:\Users\GC89140> Get-Module Microsoft365DSC -ListAvailable | select ModuleBase, Version

ModuleBase Version


C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2 1.25.212.2

PS C:\Users\GC89140> New-M365DSCReportFromConfiguration -Type HTML -ConfigurationPath "$path\TeamsExportQA.ps1" -OutputPath "$path\Teams_Configuration_report.html"
Error parsing configuration: At line:725 char:13

  •         Ensure               = "Present";
    
  •         ~~~~~~
    

The member 'Ensure' is not valid. Valid members are
'AccessTokens', 'ApplicationId', 'AssignmentType', 'CertificateThumbprint', 'Credential', 'DependsOn', 'Groups', 'Id',
'IsBlocked', 'ManagedIdentity', 'PsDscRunAsCredential', 'TenantId', 'Users'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.15\Modules\DSCParser.psm1:472 char:9

  •     throw "$($errorPrefix)Error parsing configuration: $parseErro ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Error parsing c...ntId', 'Users'.:String) [], RuntimeException
    • FullyQualifiedErrorId : Error parsing configuration: At line:725 char:13
  •         Ensure               = "Present";
    
  •         ~~~~~~
    

The member 'Ensure' is not valid. Valid members are
'AccessTokens', 'ApplicationId', 'AssignmentType', 'CertificateThumbprint', 'Credential', 'DependsOn', 'Groups', '
Id', 'IsBlocked', 'ManagedIdentity', 'PsDscRunAsCredential', 'TenantId', 'Users'.

Microsoft 365 DSC Version

1.25.212.2

Which workloads are affected

Teams

The DSC configuration

Teams workload,  ps1 generated without issues but New-M365DSCReportFromConfiguration failed to create the html file

Verbose logs showing the problem

The member 'Ensure' is not valid. Valid members are
'AccessTokens', 'ApplicationId', 'AssignmentType', 'CertificateThumbprint', 'Credential', 'DependsOn', 'Groups', 'Id',
'IsBlocked', 'ManagedIdentity', 'PsDscRunAsCredential', 'TenantId', 'Users'.

Below is what near line 725

  TeamsM365App "TeamsM365App-2240210e-526e-49ca-83e7-6f78168bc3f0"
        {
            AssignmentType       = "Noone";
            Credential           = $Credscredential;
            Ensure               = "Present";
            Groups               = @();
            Id                   = "2240210e-526e-49ca-83e7-6f78168bc3f0";
            IsBlocked            = $False;
            Users                = @();
        }

Environment Information + PowerShell Version

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