Power Platform CLI solution support for Power Pages (preview)
[This topic is prerelease documentation and is subject to change.]
The Power Pages enhanced data model supports the solution awareness feature for Power Pages. This feature helps you use Microsoft Power Platform solution capabilities to move a website configuration from one environment to another.
Important
- This feature is a preview feature.
- Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
The Power Platform CLI provides solution-related commands that can also be applied to Power Pages.
Create a new solution
Run the following command to create a new solution by using the PAC CLI:
pac solution init --publisher-name '<<publisher name>>' --publisher-prefix '<<publisher prefix>>' --outputDirectory '<<directory>>'
Example:
pac solution init --publisher-name 'ppmaker' --publisher-prefix 'pp' --outputDirectory 'c:\dev\ppsolution'
Add an existing website to a solution
To add a website to a solution by using the PAC CLI, you must determine the component type and the component ID.
Determine the component type
To get the specific Power Pages componentType
names and values, send a GET request by using the Dataverse Web API OData call.
{OrgURL}/api/data/v9.1/solutioncomponentdefinitions?$filter=startswith(name,'powerpage')&$select=name,solutioncomponenttype
Determine the component ID
To get the componentId
value, send a GET request by using the Web API OData call.
You can use the following endpoints:
powerpagesite
powerpagesitelanguage
powerpagecomponent
The following example uses the powerpagesite
endpoint:
{OrgURL}/api/data/v9.1/powerpagesites?$select=name
After you've determined the component type and component ID, run the following command to add an existing website to a solution by using the PAC CLI:
pac solution add-solution-component
Example:
pac solution add-solution-component -sn SampleSolution -c c6f2aec0-ddd2-ed11-a7c6-6045bdf05d59 -ct 10463
In this example:
SampleSolution
represents the solution's unique name.c6f2aec0-ddd2-ed11-a7c6-6045bdf05d59
is the record ID of the Power Pages site.10319
is theCompomponentType
value of the Power Pages site solution from the earlier Web API response.
Run pac solution sync
or pac solution export
to export the solution by using the PAC CLI.
You can now move the Power Pages website configuration by using Microsoft Power Platform Application Lifecycle Management (ALM) processes.