Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
@RuiRomano RuiRomano Docs 292a6fa Jul 15, 2018
1 contributor

Users who have contributed to this file

86 lines (54 sloc) 2.57 KB
Module Name Module Guid Version
PowerBIPS.Tools
4380560b-ec14-4627-af81-635405ceb29f
1.0.0.1

PowerBIPS.Tools Module

Description

This module is a collection of very useful tools for Power BI. For example: - Export PBI Desktop into CSV/SQL - Convert from PBI Desktop into AS Tabular - Get a dataset schema from a Power BI Desktop file (to create a REST DataSet)

Available on PowerShell Gallery:

https://www.powershellgallery.com/packages/PowerBIPS.Tools

Install from PowerShell Gallery

Install-Module -Name PowerBIPS.Tools
# Or without admin priviledge:
Install-Module -Name PowerBIPS.Tools -Scope CurrentUser

Sample Script - Convert PBIX to AS Tabular

Convert-PowerBIDesktopToASTabular -pbiDesktopWindowName "*VanArsdel - Sales*" -outputPath "$currentPath\SSAS"

Sample Script - Export PBI Desktop to SQL Server or CSV

# Export to SQL Server
Export-PBIDesktopToSQL -pbiDesktopWindowName "*PowerBIETLSample*" -sqlConnStr "Data Source=.\sql2017; Initial Catalog=Dummy; Integrated Security=true" -sqlSchema "stg"

# Export to CSV Files
Export-PBIDesktopToCSV -pbiDesktopWindowName "*PowerBIETLSample*" -outputPath ".\outputFolder"

Sample Script - Create a REST API DataSet using Power BI Desktop

$dataSetSchema = Get-PBIDataSetFromPBIDesktop -datasetName $datasetName -pbiDesktopWindowName "*RealTime*"

$dataSetSchema = New-PBIDataSet -authToken $authToken -dataSet $dataSetSchema -ignoreIfDataSetExists

Sample Script - Create a PushDataset from Power BI Desktop

# Get a PBIDataSet schema from PBIDesktop
$dataSet = Get-PBIDataSetFromPBIDesktop -pbiDesktopWindowName "*PBI Window*" -datasetName "PushDataSet"

# Create the REST API dataset on powerbi.com
$dataSet = New-PBIDataSet -dataSet $dataSet -groupId "workspace Id"

PowerBIPS.Tools Cmdlets

Convert-PowerBIDesktopToASTabular

Convert from a Power BI Desktop into AS Tabular Project

Get-PBIDataSetFromPBIDesktop

Get's a PowerBI Dataset Schema from Power BI Desktop to create a Push DataSet

Export-PBIDesktopToCSV

Exports the tables from a Power BI Desktop model into CSV files

Export-PBIDesktopToSQL

Exports the tables from a Power BI Desktop model into a SQL Server Database (automatically creates the tables)

Get-PBIDesktopTCPPort

Discover the TCP Port of the Analysis Services instance on Power BI Desktop

You can’t perform that action at this time.