Apr 14 2021 12:49 AM - edited Apr 14 2021 12:51 AM
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.
Please suggest
Thanks
Amit Srivastava
Apr 16 2021 03:16 PM
Hell @amsrivas28,
Can you please elaborate on what error are you getting when cmdlet breaks?
There are two possible options to get PowerBI data flow information:
1) Get all Power BI workspaces along with related reports, dashboards, datasets, dataflows and workbooks within the user's organization:
Get-PowerBIWorkspace -Scope Organization -Include All
2) Get all Power BI dataflows within a user's organization
Get-PowerBIDataflow -Scope Organization
Hope that helps.
Apr 19 2021 01:51 AM
Hi @AndySvints ,
I need to retreive data that will have relationship between Workspace and Dataflow that's why i am passing workspaceid into the Dataflow command and later will retreive workspaceid as well alongwith dataflow detail.
I am more than happy if you can suggest any other way to fetch relationship between all the heads such as workspaces, dataset, dataflow report and user.
Thanks
Amit