Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 2.57 KB

PowerBIPS.Tools.md

File metadata and controls

85 lines (54 loc) · 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 from a Power BI Desktop into AS Tabular Project

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

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

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

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