-
Notifications
You must be signed in to change notification settings - Fork 465
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
New-M365DSCDeltaReport: Error $typeStaticMethods = [] | gm - ... Missing type name after '[' #4701
Comments
See #4676 |
I updated the Version of M365DSC to 1.24.522.1 and forced an update of all Dependencies. Still no luck. |
@ThoVos-CH Did you already try the |
@FabienTschanz I just confirmed that enabling WinRM fixes this problem on my DevOps pipelines, although setting it up there involves a little bit more work than |
@FabienTschanz That did the trick. My Winrm Service was deactivated. After running winrm quickconfig, no errors. |
Description of the issue
When creating a Delta Report of two configurations the commandlet New-M365DSCDeltaReport throws errors for every assignement in configuration files (Config below was for blueprint):
Invoke-Expression : In Zeile:1 Zeichen:63 + ... $typeStaticMethods = [] | gm - ... + ~ Der Typname nach "[" fehlt. In Zeile:4 Zeichen:46 + []::TryParse($subExpressi ... + ~ Der Typname nach "[" fehlt. In C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.4\Modules\DSCParser.psm1:280 Zeichen:25 + ... Invoke-Expression -Command $scriptBlock | Out-N ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException + FullyQualifiedErrorId : MissingTypename,Microsoft.PowerShell.Commands.InvokeExpressionCommand
You can reproduce it with a Policy which has assignments in it. The error will be thrown also on commandlet Assert-M365DSCBlueprint.
The only workaround for me was to remove all assignments from all configurations (source and destination).
To be sure i:
Removed Module
Reinstalled Module
Update-M365DSCModule
Update-M365DSCDependencies
Uninstall-M365DSCOutdatedDependencies
Microsoft 365 DSC Version
1.24.515.2
Which workloads are affected
Intune
The DSC configuration
Verbose logs showing the problem
No response
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: