Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
amsrivas
Helper IV
Helper IV

Powershell iterative command on batches of Power BI Metadata

Hi Folks!!

I need to retrieve Dataflow based on Workspace as per below PowerShell command

 

$Workspaces = Get-PowerBIWorkspace

$res = @( foreach ($workspace in $Workspaces) {Get-PowerBIDataFlow -Workspace $workspace }) | Export-Csv -NoTypeInformation -Path C:\Data\Dataflow.csv

I have near about 5000 workspace to pass in the above command.

 

Issue - This command breaks after passing 200th workspace to the script.

Can understand the failure as it is the limitation of PowerShell that it can only pass 200 record at a time.

 

Requirement - Is it possible to write command in such a way that it will pass 200 workspace first in one batch and another 200 in another batch i.e.

  1. If we could list workspace ID’s and batch them till 200 and then process them.
  2. Later next batch condition should be >200 & <= 400 and so on….

 

Please suggest 

Thanks

Amit Srivastava

 

1 REPLY 1
lbendlin
Super User
Super User

Please explain the true requirement behind this request.  What are you planning to do with the dataflows afterwards?

 

This sounds more of a job for your O364 tenant admin.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.