What is Microsoft Power Platform CLI?
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 more.
Microsoft Power Platform CLI is available for use in the GCC and GCC High (US Sovereign cloud) regions. See the
--cloud parameter for the pac auth create command to find out about supported US Sovereign cloud environments.
Install Microsoft Power Platform CLI
You can install Microsoft Power Platform CLI using either or both of the following:
|Install using Power Platform Tools for Visual Studio Code||Enables use of commands within a PowerShell terminal within Visual Studio Code on Windows 10, Windows 11, Linux, and MacOS.|
|Install Power Platform CLI for Windows||Enables use of commands using PowerShell for Windows 10 and Windows 11.
Certain commands, such as pac data, are only available using Power Platform CLI for Windows
Install 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.
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. Use the following instructions to support this type of installation.
Go to the Marketplace and instead of pressing the Install button, click the Download Extension link under Resources.
This is will download a file with a .vsix extension on to your workstation.
Launch Visual Studio Code and select the Extensions icon, select the ellipsis on the Extensions side bar, and then select Install from VSIX.
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'll notice the icon for the Power Platform Tools.
The final check would be to launch the terminal window and type
Uninstall Power Platform Tools for Visual Studio Code
To uninstall Power Platform Tools for Visual Studio Code, follow the same steps as installing the extension, except this time select the Uninstall button.
Install Power Platform CLI for Windows
To install Power Platform CLI for Windows, download and run the .msi file found here: Microsoft Power Platform CLI and choose the Install option.
Update Power Platform CLI for Windows
To take advantage of all the latest capabilities, update Microsoft Power Platform CLI tooling to the latest version by using this command:
pac install latest
pac install latest command is not applicable for Power Platform Tools for Visual Studio Code. It will look for updates and update automatically each time you open Visual Studio Code.
Uninstall Power Platform CLI for Windows
To uninstall Power Platform CLI for Windows, download and run the .msi from Microsoft Power Platform CLI and choose the Remove option.
This table lists some of the common commands used in the PAC CLI.
|pac admin||Commands for environment lifecycle features.|
|pac auth||Commands to connect to your environment.|
|pac application||Commands to install AppSource applications that are pre-requisites for the solution work in the target environment (Preview).|
|pac canvas||Commands for working with canvas app source files (Preview).|
|pac org||Commands for working with Dataverse environments.|
|pac package||Commands for working with solution packages.|
|pac paportal||Commands for working with Portals support for Microsoft Power Platform CLI.|
|pac pcf||Commands for working with Power Apps component framework.|
|pac plugin||Command to create a plug-in project.|
|pac solution||Commands for working with Dataverse solution projects.|
|pac telemetry||Manages the telemetry settings.|
For the complete list of supported commands, see Microsoft Power Platform CLI Command Groups or run the
pac command or
pac <subcommand> - for example:
Microsoft Power Platform CLI Command Groups
Power Apps component framework
Submit and view feedback for