Forum Discussion
Powershell scripts to list all entities
Hi RGI,
Maybe something isn't that clear. Since the PowerShell script is many commands, we can just log in the Power BI and send a command. Then we can get the result. Please refer to the snapshot below.
Maybe you'd like a piece of organized script to get everything?
Best Regards,
Dale
v-jiascu-msft wrote:Maybe you'd like a piece of organized script to get everything?
Yes. Something like this (which I import into Excel and use vlookup)
cls
$tentantWorkspaces = Get-PowerBIWorkspace -Scope Organization -Filter ("tolower(type) eq 'group'")
Write-Host "There are --" $tentantWorkspaces.Count "-- workspaces in this Power BI tenant."
$spaces = Get-PowerBIWorkspace -Scope Organization -Filter ("tolower(type) eq 'group'")
foreach ($space in $spaces)
{
write-host $space.Id "|" $space.Name "|" $space.Type "|" $space.State "|" $space.IsOnDedicatedCapacity "|" $space.CapacityId
}
$dss = Get-PowerBIDataset -Scope Organization
foreach ($ds in $dss)
{
Write-Host "|"$ds.Id "|" $ds.name "|" $ds.ConfiguredBy "|" $ds.IsOnPremGatewayRequired
}
$reports = Get-PowerBIReport -Scope Organization
foreach ($report in $reports)
{
Write-Host "|"$report.Id "|" $report.name "|" $report.DatasetId
}