https://github.com/microsoft/PowerBI-Cli
Power BI command line tool for managing Power BI Embedded workspace collections
https://github.com/microsoft/PowerBI-Cli
Last synced: 3 months ago
JSON representation
Power BI command line tool for managing Power BI Embedded workspace collections
- Host: GitHub
- URL: https://github.com/microsoft/PowerBI-Cli
- Owner: microsoft
- License: other
- Archived: true
- Created: 2016-04-20T22:39:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T06:48:59.000Z (over 7 years ago)
- Last Synced: 2024-05-09T17:49:52.904Z (10 months ago)
- Language: TypeScript
- Size: 73.2 KB
- Stars: 98
- Watchers: 24
- Forks: 44
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - microsoft/PowerBI-Cli - Power BI command line tool for managing Power BI Embedded workspace collections (TypeScript)
README
# Deprecation notice
Power BI Cli is deprecated and is no longer supported.# powerbi-cli
Power BI command line interface for managing Power BI Embedded workspace collections[](https://travis-ci.org/Microsoft/PowerBI-Cli)
[](https://www.npmjs.com/package/powerbi-cli)
[](https://www.npmjs.com/package/powerbi-cli)
[](https://www.npmjs.com/package/powerbi-cli)## Installation
Install from npm`npm install powerbi-cli -g`
## global flags
The following global flags are available to all commands. These can be stored with the `config` command-c --collection
> The Power BI workspace collection name-w --workspace
> The Power BI workspace-k --accessKey
> The Power BI access key. This key can be acquired from your Power BI workspace collection within your azure subscription-b --baseUri
> The base URI that will be used to call the Power BI REST apis. The default value is https://api.powerbi.com.-r --reportId
> The Power BI report id-h --help
> Displays command line help### Help
**Display root level help**`powerbi -h`
**Display command specific help**
`powerbi -h`
## Commands
### config
Gets and sets configuration values that are reused in commands. Config values are stored within a `.powerbirc` file. If you store access keys please ensure that you **do not** commit these values to any public source control. If your access keys are compromised a user can take full control over your Power BI workspace collection. If you feel your account was compromised you can regenerate your access keys in the azure portal.**Setting new configuration values**
`powerbi config -c -k `
**Getting a list of all configured values**
`powerbi config`
#### get-workspaces
Gets a list of all workspaces within a workspace collection`powerbi get-workspaces -c -k `
#### create-workspaces
Creates a new workspaced within a workspace collection`powerbi create-workspace -c -k `
#### get-datasets
Gets a list of all datasets within a workspace`powerbi get-datasets -c -w -k `
#### delete-dataset
Deletes a dataset and any underlying linked reports`powerbi delete-dataset -c -w -k -d `
#### get-reports
Gets a list of all reports within a workspace`powerbi get-reports -c -w -k `
#### import
Imports a PBIX file into a`powerbi import -c -w -k -f -n [name] -o [overwrite]`
#### update-connection
Updates connection strings and/or credentials for an existing dataset`powerbi update-connection -c -w -k -d -s [connectionString] -u [username] -p [password]`
#### create-embed-token
Creates a Power BI embed token.`powerbi create-embed-token -c -k -w -r -u [username] --roles [roles1,roles2,...] -s [scope1 scope2 ...] -e `
`powerbi create-embed-token -c -k -w -d -u [username] --roles [roles1,roles2,...] -s [scope1 scope2 ...] -e `
> Examples
To create a Power BI embed token with specific user and one role:
`powerbi create-embed-token -c -k ...key -w 06640...744d8f10 -r 07842...e30 -u "Ali Hamud" --roles "Developer" -e "03-02-2018 15:03:54 UTC"`
To create a Power BI embed token with specific user and multiple roles:
`powerbi create-embed-token -c -k -w 06640...744d8f10 -r 07842...e30 -u "Ali Hamud" --roles "Developer,Manager"`
To create Power BI embed token to create a report using dataset
`powerbi create-embed-token -c -k -w 06640...744d8f10 -d 12532...b13 -u "Ali Hamud" --roles "Developer,Manager" -s "Dataset.Read Workspace.Report.Create"`