When using Update-DbcPowerBiDataSource I get an error that ListDictionaryInternal is not supported for serialization
Bug Report
General Troubleshooting steps
- [X] Verified running the latest release of dbachecks?
Does (Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()
Yes

- [X] Verified errors are not related to permissions?
- [X] Can duplicate in new/clean PowerShell session (clean =
powershell -NoProfile)?
Version Information
- Operating System (Name|Version): Windows 10 Pro | 10.0.19043
- PowerShell Version: 5.1.19041.1237
- SQL Server (Edition|Version): SQL 2019 Standard | 15.0.4153
Steps to Reproduce
<--
PLEASE include as much information as possible if this is a bug report.
The more you include the faster we can identify the problem and get it fixed
-->
I just run the command like this:
Invoke-DbcCheck -SqlInstance instancename -AllChecks -ExcludeCheck TestLastBackup, TestLastBackupVerifyOnly -passthru | Update-DbcPowerBiDataSource
Errors at the end: Convertto-Json : The type 'System.Collections.ListDictionaryInternal' is not supported for serialization or deserialization of a dictionary. Keys must be strings.
- [ ] Attach any screenshots (if possible/allowed)
- [X] Attach output from PowerShell console (if possible/allowed) (above)
Description of Bug
<--
PLEASE include as much information as possible if this is a bug
Explain what it does that you would like it not to do
or
What it doesnt do that you would like it to do :-)
-->
It should update my PowerBiDataSource.
I hit the same problem. is there a any workaround to by-pass?
as a workaround tried another user and problem disappear. we have same permission with my friend. he can run this command without any error, but I can't. interesting.. I didn't investigate to identify to root cause.
I wonder if this error is memory related with converting to Json. Maybe we want to add the function Convert-OutputObject and use that instead of ConvertTo-Json? I know Rob states to output to database for best results, however, if we can possibly eliminate use of ConvertTo-Json with the above, that might eliminate the challenges with ConvertTo-Json.