en en ms fi da da da da ca da da da ms hbs_lat ms ms ms en da da ms ms da es da de ro en da da da da de da da de en it da da da es da da en da da da en da sv de da en da en en en en en da pt fr fr en de en sv da da da da sv da da en en en en en ceb en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en lt en en ms da da da da da en da da da da da en tr da ca en en id en en en en en en en en ms ms ms en en ml da en en nl nl da en da de de en en nl en en nl nl sv en da de de en en nl en en nl nl sv en da de de en en nl en en sv nl da en da de da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da de de en en nl en en nl nl da en da de de en en nl en en nl nl da en da de de en en nl en en nl en da ms en en en sv da fr da it de en ms ms en it da da de en en en sv da en da en da da en da da da hbs_lat da de de de el de en en tr en en en en en en en es es fi fr fr fr fr hu it it ja ko da nl nl pl pt pt ru sv th tr zh zh ar he
Announcing APIs and PowerShell Cmdlets for Power BI Administrators | Microsoft Power BI-blog | Microsoft Power BI
Office 365 + Power BI
Power BI enables organizations to adopt a data-driven culture where every person can get value from data. Front and center are business users creating reports and dashboards, sharing insights, making decisions, and taking action. But organizations must also be able to govern this world of self-service BI effectively. Among other things, IT administrators must handle licensing and capacity provisioning, and take care of increasing security, governance, and regulatory requirements. Te General Data Protection Regulation (GDPR) in Europe is just one example of emerging regulations and compliance requirements impacting organizations' analytics deployments. Power BI service administrators need visibility into every aspect of their BI environments more than ever.
Today, we are releasing new Power BI Admin APIs, along with a .NET SDK and a PowerShell module, that enable administrators to discover artifacts in their Power BI tenant, as well as take administrative actions. These new capabilities unlock new possibilities for administrators that go beyond what’s currently available in te Power BI Admin Portal. Over time, we expect to incorporate some of these capabilities into te Power BI Admin Portal as well, to enable common scenarios without having to use PowerShell.
Read on for an example of how te Power BI Management module for Windows PowerShell can help Power BI admins in a realistic scenario, or jump to te resources at te bottom for details on documentation and downloads. Also stay tuned for further articles covering te new Power BI APIs and cmdlets in greater detail.
Walkthrough: Enumerating datasets and reports in a Power BI tenant
Imagine your Sales database is under heavy load because so many people are building Power BI reports on it. It is great that te data is useful, but maybe some report optimizations could help to lower te query load. As a Power BI administrator, you want to identify te reports and datasets and contact te owners to start te process, but how do you know who they are when many people have access to te Sales database and could have built te reports?
In order to answer this question, you must identify te datasets and reports that use te Sales database. Te task is to enumerate all these resources across all workspaces at te Power BI tenant level. As a follow-up, you could then contact te dataset owners to discuss possible optimization opportunities.
Step 1: Installing te Power BI management cmdlets and logging in to Power BI
Te Power BI management cmdlets are available as a module from te PowerShell Gallery. You can install them by using te command Install-Module -Name MicrosoftPowerBIMgmt -Scope CurrentUser. Among other things, this module includes a Login-PowerBI cmdlet to start a session with te Power BI service. Remember to log in with an account that has Power BI service administrator rights.
Step 2: Enumerating all datasets that use a SQL Server database
By using te Get-PowerBIDataset and Get-PowerBIDatasource cmdlets, you can enumerate all those datasets across your Power BI tenant that use a data source referencing a database name Sales hosted on a Server called SQLDB01. Note that you must specify Organization as te scope of te operation so that te cmdlets include all datasets and data sources. Only Power BI admins can use this scope. Power BI users without service admins rights are confined to Individual scope, which includes only those resources that te user has explicit permissions to access.
$datasetIds = Get-PowerBIDataset -Scope Organization -ErrorAction SilentlyContinue | Foreach {$dsId = $_.Id; Get-PowerBIDatasource -DatasetId $dsId -Scope Organization -ErrorAction SilentlyContinue | Where-Object {$_.DatasourceType -eq 'Sql' -and ($_.ConnectionDetails.Server -like 'sqldb01' -and $_.ConnectionDetails.Database -like 'sales')} | Foreach { $dsId }}
Note also that this command can take a long time to run if you are dealing with a large number of datasets in your Power BI tenant. Assuming 2-3 seconds per dataset, it might take 30-50 minutes to process 1,000 datasets. If you want to count them upfront, you can use te command $(Get-PowerBIDataset -Scope Organization | measure).Count.
Step 3: Enumerating all reports that use te identified datasets
With te dataset Ids in hand, you can now enumerate all reports that use te datasets by using te Get-PowerBIReport cmdlet. Note that you must again specify Organization as te scope of operation because te operation is supposed to be performed at te Power BI tenant level. Te OData filter expression for te Get-PowerBIReport cmdlet retrieves only those reports that use te relevant datasets.
$reports = $datasetIds | Foreach { Get-PowerBIReport -Filter "datasetId eq '$_'" -Scope Organization }
Step 4: Contacting te creators of te datasets
You can also determine te creators of te datasets to discuss performance optimizations with them. Te dataset objects provide this information through te ConfiguredBy property. Te PowerShell session still has te relevant IDs available in te $datasetIds variable, which can be passed to te -Id parameter of te Get-PowerBIDataset cmdlet, as te following snippet illustrates. As it turns out, there is four Power BI users in this imaginary scenario creating datasets against te Sales database. It should be no problem to help these users fine tune their datasets to lower te workload on te SQL Server instance.
$datasetIds | Foreach { Get-PowerBIDataset -Id $_ -Scope Organization } | foreach { $_.ConfiguredBy }
Te APIs and cmdlets for Power BI administration open entirely new and exciting capabilities. Te initial release focuses on te most important needs and covers workspaces, dashboards, reports, datasets, and imports. Subsequent iterations will deliver even deeper and richer capabilities to make Power BI admins more productive in a broader scope. Let us know of any additional requirements you might have through te usual Power BI community channels or as comments to this article below. Stay tuned for more good news coming soon. And thank you very much for supporting Power BI as an admin in your organization!
APIs and cmdlets resources
Use te following table to locate resources that can help you get started with te APIs and cmdlets for Power BI administration.
Power BI Management module in te PowerShell Gallery https://www.powershellgallery.com/packages/MicrosoftPowerBIMgmt
Power BI cmdlets documentation https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps
Open Source repository for Power BI cmdlets on GitHub https://github.com/Microsoft/powerbi-powershell
Power BI SDK for .NET https://github.com/Microsoft/PowerBI-CSharp
Power BI REST API Reference https://docs.microsoft.com/en-us/rest/api/power-bi/
Quick reference for PowerShell cmdlets, REST APIs, and SDK for Power BI administration https://docs.microsoft.com/en-us/power-bi/service-admin-reference
Power BI Community site https://community.powerbi.com/
Enumerating Datasets and Data Sources
Tilmeld dig Power BI-nyhedsbrevet
Tilmeld dig nedenfor for at modtage de seneste nyheder fra Power BI direkte i din indbakke.
Land Afghanistan Albanien Algeriet Amerikansk Samoa Andorra Angola Anguilla Antarktis Antigua og Barbuda Argentina Armenien Aruba Aserbajdsjan Australien Bahamas Bahrain Bailiwick of Jersey Bangladesh Barbados Belgien Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnien-Hercegovina Botswana Bouvetøen Brasilien Brunei Darussalam Bulgarien Burkina Faso Burundi Cabo Verde Cambodja Cameroun Canada Caymanøerne Chile Cocosøerne (Keelingøerne) Colombia Comorerne Congo Cookøerne Costa Rica Côte d'Ivoire Curaçao Cypern Danmark De Amerikanske Jomfruøer De Amerikanske oversøiske øer De Britiske Jomfruøer De Forenede Arabiske Emirater Den Centralafrikanske Republik Den Demokratiske Republik Congo Den Dominikanske Republik Det Britiske Territorium i Det Indiske Ocean Det palæstinensiske selvstyre Djibouti Dominica Ecuador Egypten El Salvador Eritrea Estland Etiopien Falklandsøerne Fiji Filippinerne Finland Frankrig Fransk Guyana Fransk Polynesien Franske Oversøiske Områder Færøerne Gabon Gambia Georgien Ghana Gibraltar Grenada Grækenland Grønland Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard- og McDonaldøerne Honduras Indien Indonesien Iran Irland Island Isle of Man Israel Italien Jamaica Jan Mayen Japan Jordan Juleøen Kasakhstan Kenya Kina Kirgisistan Kiribati Korea Kosovo Kroatien Kuwait Laos Lesotho Letland Libanon Liberia Liechtenstein Litauen Luxembourg Madagaskar Malawi Malaysia Maldiverne Mali Malta Marokko Marshalløerne Martinique Mauretanien Mauritius Mayotte Mexico Mikronesien Moldova Monaco Mongoliet Montenegro Montserrat Mozambique Namibia Nauru Nederlandene Nepal New Zealand Nicaragua Niger Nigeria Niue Nordmakedonien Nordmarianerne Norfolk Island Norge Ny Kaledonien Oman Pakistan Palau Panama Papua Ny Guinea Paraguay Peru Pitcairn Polen Portugal Puerto Rico Qatar Reunion Rumænien Rwanda Saba Saint Barthélemy Saint Kitts og Nevis Saint Lucia Saint Martin Saint Pierre og Miquelon Saint Vincent og Grenadinerne Salomonøerne Samoa San Marino São Tomé og Príncipe SAR Hongkong SAR Macao Saudi-Arabien Schweiz Senegal Serbien Seychellerne Sierra Leone Singapore Sint Eustatius Sint Maarten Slovakiet Slovenien Somalia South Georgia og De Sydlige Sandwichøer Spanien Sri Lanka St. Helena, Ascension, Tristan da Cunha Storbritannien Sudan Surinam Svalbard Sverige Swaziland Sydafrika Sydsudan Syrien Tadsjikistan Taiwan Tanzania Tchad Thailand Timor-Leste Tjekkiet Togo Tokelau Tonga Trinidad og Tobago Tunesien Turkmenistan Turks- og Caicosøerne Tuvalu Tyrkiet Tyskland Uganda Ukraine Ungarn Uruguay USA Usbekistan Vanuatu Vatikanstaten Venezuela Vietnam Wallis og Futunaøerne Yemen Zambia Zimbabwe Ækvatorialguinea Østrig Ålandsøerne
Jeg vil gerne modtage Power BI-nyhedsbrevet. Erklæring om beskyttelse af personlige oplysninger.
Deltagelse kræver, at dine personlige oplysninger overføres til andre lande, som Microsoft driver forretning i, herunder USA. Når du sender denne formular, accepterer du overførslen af dine data uden for Kina. Erklæring om beskyttelse af personlige oplysninger.
Hvad er Power BI?
Power BI er en pakke med virksomhedsanalyseværktøjer til dataanalyse og vidensdeling. Overvåg din virksomhed, og få hurtigt svar med omfattende dashboards, der er tilgængelige på alle enheder.
Få de seneste nyheder fra Power BI-blog
Abonner via mail Du skal angive en gyldig mailadresse Du har angivet en personlig mailadresse. Angiv din arbejds- eller skolemailadresse. Noget gik galt. Prøv igen senere.
Beskyttelse af personlige oplysninger og cookies