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
Highlighted
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
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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

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