< Back

Import-PBIFile

Sat Jan 18, 2020 8:42 pm

NAME Import-PBIFile



SYNOPSIS

Creates new content on the specified workspace from a .pbix file.





SYNTAX

Import-PBIFile [[-authToken] <String>] [-file] <Object> [[-dataSetName] <String>] [[-nameConflict] <String>]

[[-groupId] <String>] [<CommonParameters>]





DESCRIPTION

Creates new content on the specified workspace from a .pbix file.





PARAMETERS

-authToken <String>

The authorization token required to comunicate with the PowerBI APIs.

Use `Get-PBIAuthToken` to get the authorization token string.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-file <Object>

The full path to the .pbix file.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-dataSetName <String>

The display name of the dataset, should include file extension.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-nameConflict <String>

Determines what to do if a dataset with the same name already exists.



Required? false

Position? 4

Default value Ignore

Accept pipeline input? false

Accept wildcard characters? false



-groupId <String>

The workspace ID.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





To import .pbix files larger than 1 GB, see

https://docs.microsoft.com/en-us/rest/a ... adlocation, suported only for

workspaces on premium capacity.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$file = Resolve-Path .\\Samples\\PBIX\\MyMovies.pbix



$authToken = Get-PBIAuthToken -Verbose

Import-PBIFile -authToken $authToken -file $file -verbose









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$file = Resolve-Path .\\Samples\\PBIX\\MyMovies.pbix



$authToken = Get-PBIAuthToken -Verbose

$group = Get-PBIGroup -name "Test Workspace"

$result = Import-PBIFile -authToken $authToken -groupId $($group.id) -file $file -verbose

$importResult = Get-PBIImports $authToken -groupId $($group.id) -importId $($id.id)

$importResult | Out-GridView











RELATED LINKS