Skip to content

Commit 86d8e24

Browse files
committed
docs
1 parent dfede14 commit 86d8e24

File tree

6 files changed

+43
-39
lines changed

6 files changed

+43
-39
lines changed

Modules/PowerBIPS.Tools/PowerBIPS.Tools.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
Module Name: PowerBIPS.Tools
33
Module Guid: 4380560b-ec14-4627-af81-635405ceb29f
4-
Download Help Link: {{Please enter FwLink manually}}
5-
Help Version: {{Please enter version of help manually (X.X.X.X) format}}
6-
Locale: en-US
4+
Version: 1.0.0.1
75
---
86

97
# PowerBIPS.Tools Module
@@ -14,13 +12,18 @@ For example:
1412
- Convert from PBI Desktop into AS Tabular
1513
- Get a dataset schema from a Power BI Desktop file (to create a REST DataSet)
1614

17-
Module also available on PowerShell Gallery:
15+
## Available on PowerShell Gallery:
1816

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

21-
To install just type:
2219

20+
### Install from PowerShell Gallery
21+
22+
```powershell
2323
Install-Module -Name PowerBIPS.Tools
24+
# Or without admin priviledge:
25+
Install-Module -Name PowerBIPS.Tools -Scope CurrentUser
26+
```
2427

2528
## Sample Script - Convert PBIX to AS Tabular
2629

@@ -40,7 +43,7 @@ Export-PBIDesktopToSQL -pbiDesktopWindowName "*PowerBIETLSample*" -sqlConnStr "D
4043
4144
```
4245

43-
## Sample Script - Create a REST API DataSet with Power BI Desktop
46+
## Sample Script - Create a REST API DataSet using Power BI Desktop
4447

4548
```powershell
4649

Modules/PowerBIPS.Tools/PowerBIPS.Tools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'PowerBIPS.Tools.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '1.0.0.0'
7+
ModuleVersion = '1.0.0.1'
88

99
# ID used to uniquely identify this module
1010
GUID = '4380560b-ec14-4627-af81-635405ceb29f'

Modules/PowerBIPS/PowerBIPS.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
Module Name: PowerBIPS
33
Module Guid: 163a1640-a4f2-4b1f-a3af-2796ad56200b
4-
Download Help Link: {{Please enter FwLink manually}}
5-
Help Version: {{Please enter version of help manually (X.X.X.X) format}}
6-
Locale: en-US
4+
Version: 2.0.1.3
75
---
86

97
# PowerBIPS Module
@@ -15,13 +13,17 @@ More samples of usage here:
1513
* https://ruiromanoblog.wordpress.com/2015/03/03/create-a-real-time-it-dashboard-with-powerbips/
1614
* https://github.com/DevScope/powerbi-powershell-modules/blob/master/Modules/PowerBIPS/Samples
1715

18-
Module also available on PowerShell Gallery:
16+
## Available on PowerShell Gallery:
1917

2018
https://www.powershellgallery.com/packages/PowerBIPS
2119

22-
To install just type:
20+
### Install from PowerShell Gallery
2321

22+
```powershell
2423
Install-Module -Name PowerBIPS
24+
# Or without admin priviledge:
25+
Install-Module -Name PowerBIPS -Scope CurrentUser
26+
```
2527

2628
## Sample Script - The most easy way to send data to Power BI
2729

@@ -41,6 +43,14 @@ Get-PBIReport | Export-PBIReport -destinationFolder ".\Output"
4143
4244
```
4345

46+
## Sample Script - Rebind All Reports to a different DataSet
47+
48+
```powershell
49+
50+
Get-PBIReport -groupId "WorkspaceId" | Set-PBIReportsDataset -targetDatasetId "DataSetId"
51+
52+
```
53+
4454
## Sample Script - Monitor a list of computers in Real-Time
4555

4656
```powershell

Modules/PowerBIPS/PowerBIPS.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'PowerBIPS.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '2.0.1.2'
7+
ModuleVersion = '2.0.1.3'
88

99
# ID used to uniquely identify this module
1010
GUID = '163A1640-A4F2-4B1F-A3AF-2796AD56200B'

Modules/PowerBIPS/PowerBIPS.psm1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ Returns the access token for the PowerBI REST API using the client ID and a PSCr
187187
$clientId,
188188
[Parameter(Mandatory=$false)]
189189
[string]
190-
$redirectUri,
190+
$redirectUri,
191+
[Parameter(Mandatory=$false)]
192+
[string]
193+
$tenantId,
191194
[Parameter(Mandatory=$false)]
192195
[string]
193196
$clientSecret,
@@ -199,7 +202,15 @@ Returns the access token for the PowerBI REST API using the client ID and a PSCr
199202
if ($Script:AuthContext -eq $null)
200203
{
201204
Write-Verbose -Message 'Creating new AuthenticationContext object'
202-
$script:AuthContext = New-Object -TypeName Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext -ArgumentList ($script:pbiAuthorityUrl)
205+
206+
$authorityUrl = $script:pbiAuthorityUrl
207+
208+
if (![string]::IsNullOrEmpty($tenantId))
209+
{
210+
$authorityUrl = $authorityUrl.Replace("/common/","/$tenantId/")
211+
}
212+
213+
$script:AuthContext = New-Object -TypeName Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext -ArgumentList ($authorityUrl)
203214
}
204215

205216
if ([string]::IsNullOrEmpty($clientId))

README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,7 @@
22

33
This github repository is a collection of PowerShell modules for the Power BI platform.
44

5-
## [PowerBIPS](Modules/PowerBIPS/PowerBIPS.md)
6-
7-
A PowerShell module for the Power BI Developer REST API
8-
9-
Available on PowerShell Gallery:
10-
11-
https://www.powershellgallery.com/packages/PowerBIPS
12-
13-
Install-Module -Name PowerBIPS
14-
15-
## [PowerBIPS.Tools](Modules/PowerBIPS.Tools/PowerBIPS.Tools.md)
16-
17-
This module is a collection of very useful tools for Power BI.
18-
19-
A PowerShell module with utility functions, for example:
20-
21-
* [Get-PBIDesktopTCPPort](Modules/PowerBIPS.Tools/doc/Get-PBIDesktopTCPPort.md) - Get the Power BI Desktop TCP Port
22-
* [Export-PBIDesktopToCSV](Modules/PowerBIPS.Tools/doc/Export-PBIDesktopToCSV.md) - Export data from Power BI Desktop to CSV
23-
24-
Available on PowerShell Gallery:
25-
26-
https://www.powershellgallery.com/packages/PowerBIPS.Tools
27-
28-
Install-Module -Name PowerBIPS.Tools
5+
| Module Name | Description | PowerShell Gallery |
6+
| ----------- | ----------- | ----------------------- |
7+
| [PowerBIPS](Modules/PowerBIPS/PowerBIPS.md) | Power BI REST API Cmdlets | [Download from PowerShell Gallery](https://www.powershellgallery.com/packages/PowerBIPS)|
8+
| [PowerBIPS.Tools](Modules/PowerBIPS.Tools/PowerBIPS.Tools.md) | Tools & Hacks for Power BI | [Download from PowerShell Gallery](https://www.powershellgallery.com/packages/PowerBIPS.Tools)|

0 commit comments

Comments
 (0)