cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vrocca Member
Member

Using Get-PowerBIWorkspace PowerShell command

This may be a simple/dumb question, but I'm trying to get a list of Workspaces using PowerShell, and I'm getting an error "Attempted to access an element as a type incompatible with the array"

Error.png

 

 

What am I doing wrong?

 

Thanks,
Victor Rocca | www.victorrocca.com
5 REPLIES 5
kayu Frequent Visitor
Frequent Visitor

Re: Using Get-PowerBIWorkspace PowerShell command

Hi Victor, would you be so kind to head over to the githup repo of the cmdlets and file this as an issue under: https://github.com/Microsoft/powerbi-powershell/issues? I've seen this error before but it went away after I updated .NET and Powershell. Hope this helps.

Cheers,

Kay

kayu Frequent Visitor
Frequent Visitor

Re: Using Get-PowerBIWorkspace PowerShell command

Hi Victor, would you be so kind to head over to the githup repo of the cmdlets and file this as an issue under: https://github.com/Microsoft/powerbi-powershell/issues? I've seen this error before but it went away after I updated .NET and Powershell. Hope this helps.

Cheers,

Kay

vrocca Member
Member

Re: Using Get-PowerBIWorkspace PowerShell command

Thanks Kay.

 

I have PSVersion 5.1 and .NET Framework 4.7. Do you have something different?

Thanks,
Victor Rocca | www.victorrocca.com
vrocca Member
Member

Re: Using Get-PowerBIWorkspace PowerShell command

It looks like the issue was being caused by a Newtonsoft.Json conflict. 

 

"The issue is likely due to a mismatch in Newtonsoft.Json between the Power BI cmdlets and some other cmdlets loaded into PowerShell session (via profile or calling directly)"

 

More info here: https://github.com/Microsoft/powerbi-powershell/issues/60

 

Current workaround is to use Powershell Core

Thanks,
Victor Rocca | www.victorrocca.com
Highlighted
timmac Frequent Visitor
Frequent Visitor

Re: Using Get-PowerBIWorkspace PowerShell command

I was battling this error as well.  However, I was able to get by it by using a user that is a Global Administrator.  I would suggest double checking that as well.

 

 

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 176 members 1,604 guests
Please welcome our newest community members: