Forum Discussion

Bamak's avatar
Bamak
Helper V
5 years ago

Power Shell & get Datasets size

Hi

 

  • I would like to retrieve the size of the datasets present on PBI Service (all workspaces), in order to identify the largest
  • I test the following power shell script above 
  • Unfortunately, I do not detect information concerning the size of  datasets

Thanks a lot for any help and regards

 

#1. Authenticate to Power BI with Power BI Service Administrator Account

$User = "XXXXXXX"
$PW = "XXXXXXXX"

$SecPasswd = ConvertTo-SecureString $PW -AsPlainText -Force
$myCred = New-Object System.Management.Automation.PSCredential($User,$SecPasswd)


$DSPath = "C:\DS.csv"

Connect-PowerBIServiceAccount -Credential $myCred

Get-PowerBIDataset -Scope Organization | Export-Csv $DSPath -NoTypeInformation