cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Powershell Get-PowerBIWorkspace filter argument

Hi, this seems like it should be simple, but I'm not a Powershell expert so here goes.

I want to be able to pass two filter parameters to the Get-PowerBIWorkspace Powershell cmdlet.  Here's what I've tried:

Get-PowerBIWorkspace -Scope Organization -All -Filter {("tolower(type) eq 'group'") -and ("tolower(state) eq 'active'")}

 This returns a bad request from the API:

Get-PowerBIWorkspace : Operation returned an invalid status code 'BadRequest'

So, can I pass multiple filter criteria using the -filter parameter on this cmdlet?

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Powershell Get-PowerBIWorkspace filter argument

Hi @AUaero ,

 

Try this.

Get-PowerBIWorkspace -Scope Organization -All -Filter " ( tolower(type) eq 'group' ) -and ( tolower(state) eq 'active' ) "

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Powershell Get-PowerBIWorkspace filter argument

Hi @AUaero ,

 

Please refer to the article.

Get-PowerBIWorkspace 

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper III
Helper III

Re: Powershell Get-PowerBIWorkspace filter argument

Thanks v-lionel-msft.  I've already reviewed the documentation on this cmdlet that you've suggested.  My question is specifically on how to pass multiple filter arguments to the filter parameter of the cmdlet.

Highlighted
Community Support
Community Support

Re: Powershell Get-PowerBIWorkspace filter argument

Hi @AUaero ,

 

Try this.

Get-PowerBIWorkspace -Scope Organization -All -Filter " ( tolower(type) eq 'group' ) -and ( tolower(state) eq 'active' ) "

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors