What is Microsoft Power Platform CLI?
Note
Effective June 2021, Microsoft Power Apps CLI is rebranded to Microsoft Power Platform CLI. More information: Blog: Microsoft Power Platform is the best way for teams to build together
Microsoft Power Platform CLI is now available for use in the GCC and GCC High (US Sovereign cloud) regions. Use the commandpac auth create
for help on the --cloud
parameter to find out about supported US Sovereign cloud environments.
Microsoft Power Platform CLI is a simple, one-stop developer CLI that empowers developers and ISVs to perform various operations in Microsoft Power Platform related to environment lifecycle, authentication, and work with Microsoft Dataverse environments, solution packages, portals, code components, and so on.
Install Microsoft Power Platform CLI
You can use either of the following ways to install Microsoft Power Platform CLI.
Standalone Power Platform CLI
To install standalone Power Platform CLI, follow these steps.
Download and install Microsoft Power Platform CLI.
To take advantage of all the latest capabilities, update Microsoft Power Platform CLI tooling to the latest version by using this command (not applicable for Power Platform VS Code Extension):
pac install latest
Note
- Currently, Microsoft Power Platform standalone CLI is supported only on Windows 10 and Windows 11.
- Power Platform Tools for Visual Studio Code is available on Windows 10, Windows 11, Linux, and MacOS.
Using Power Platform Tools for Visual Studio Code
Follow these steps to install Microsoft Power Platform CLI using Visual Studio Code.
Open Visual Studio Code.
Select the Extensions icon from the Activity panel. In the search bar, enter Power Platform Tools.
Select Install. Once the installation is finished, restart Visual Studio Code to see the extension within the Terminal window.
Note
Power Platform Tools for Visual Studio Code updates automatically.
Optionally, you can initiate the install into Visual Studio Code directly from Marketplace and it will launch Visual Studio Code and commence the extension installation.
You can also do a side-load install into Visual Studio Code by downloading the extension from the Marketplace.
Side-load install of Power Platform Tools for Visual Studio Code
In some organizations, downloading or initiating an install over the web is prohibited. Most cases, the organization download the installation media and stores it in a secure location and verify that it is working according to their standards, before it is distributed within the organization. To support this paradigm of installation, you can go to the Marketplace and instead of pressing the install button, press the download extension.
This is will download a file with a .vsix extension on to your workstation.
Launch Visual Studio Code and select the Extensions icon, click on the ellipsis on the Extensions side bar, and then select Install from VSIX.
Standalone Power Platform CLI
To install standalone Power Platform CLI:
Download and install Microsoft Power Platform CLI.
To take advantage of all the latest capabilities, update Microsoft Power Platform CLI tooling to the latest version by using this command (not applicable for Power Platform VS Code Extension):
pac install latest
Note
- Currently, Microsoft Power Platform CLI is supported only on Windows 10 and Windows 11.
- Power Platform Tools for Visual Studio Code, and works on Windows 10, Windows 11, Linux, and MacOS.
Successful installation
Once the installation is successful, you will need to restart Visual Studio Code, upon which you will see the following notification.
On the Activity bar you will notice the icon for the Power Platform Tools.
The final check would be to launch the terminal window and type pac
.
Common commands
This table lists some of the common commands used in the CLI.
Command | Description |
---|---|
Admin | Commands for environment lifecycle features. |
Auth | Commands to authenticate to Dataverse. |
Application | Commands to install AppSource applications that are pre-requisites for the solution work in the target environment (Preview). |
Canvas | Commands for working with canvas app source files (Preview). |
Org | Commands for working with Dataverse environments. |
Package | Commands for working with solution packages. |
Paportal | Commands for working with Power Apps portals (Preview). |
PCF | Commands for working with Power Apps component framework. |
Plugin | Command to create a plug-in project. |
Solution | Commands for working with Dataverse solution projects. |
Telemetry | Manages the telemetry settings. |
Tip
For the complete list of supported commands, run the pac
command or pac
<subcommand> - for example: pac solution
.
Uninstall Microsoft Power Platform CLI
To uninstall Microsoft Power Platform CLI tooling, run the MSI from here.
To uninstall the Visual Studio Code extension, follow the same steps as installing the extension, except this time select the Uninstall button.
If you're a Private Preview participant and have an older version of CLI, follow these steps:
To find out where Microsoft Power Platform CLI is installed, open a command prompt and enter
where pac
.Delete the PowerAppsCLI folder.
Open the Environment Variables tool by running the command
rundll32 sysdm.cpl,EditEnvironmentVariables
in the command prompt.In the
User variable for...
section, double-click to selectPath
.Select the row containing the PowerAppsCLI path, and then select Delete on the right side.
Select OK twice.
See also
प्रतिक्रिया
के लिए प्रतिक्रिया सबमिट करें और देखें