Power Platform Command Line: June Update

Kartik Kanakasabesan

A new month, and a new update for the Power Platform CLI. We are delighted to bring you all a new set of capabilities to help improve your developer experience with Power Platform, so let us get into it.

New Capabilities

Ability to list and update the settings of an environment.

As most of you deploy applications to various environments, sometimes you need to make sure those features are enabled before you deploy them. Take the case of PCF controls, before you deploy the solution with a PCF control, you have to make sure that the PCF Control feature is enabled in the target environment before you deploy the application. To that effect, the Power Platform Command has now got 2 new commands:

`pac org list-settings`: to list all the environment attributes (docs)

`pac org update-settings`: Update the value of the property (docs)

Here is an example of the new capability, with the filter parameter, if you don’t use the filter parameter, you will see all the parameters and their respective values. In this case we are getting the environment ready to import the creator kit.

A screen shot of a computer Description automatically generated

Now we enable the environment to accept PCF enabled canvas apps

A computer screen with white text Description automatically generated

A black screen with white text Description automatically generated

And now we can install the creator kit successfully!

Although the values when listing the settings, it says Yes/No as values, please use true/false when using update-settings to update the values!

Smarter Solution Import

Has it ever happened that you were importing a series of solutions, but the version of the solution in the target environment was higher than the version you were importing or even the same version, and you just wanted to skip it …. Well now you can!! The pac solution import command has a new parameter called –skip-lower-version

Support for AI builder

Now you can all the AI builder models that are already in your environment you can also use them to build FetchXML query. Here is an example:

List all the AI models available in your environment with the pac copilot list command

A screenshot of a computer Description automatically generated

I can then use the Open AI model to generate a FetchXML query and redirect the output to an xml file

A computer screen with white text Description automatically generated

Now I can take this general purpose query and make it relevant to my Dataverse environment:

A computer screen with white text Description automatically generated

And now we can execute the FetchXML query:

A screen shot of a computer Description automatically generated

Updated Capabilities

Service Principal Creation Update

In the last update we provided the ability to create a service principal from the Power Platform CLI. We have now updated the pac admin create-service-principal command to add the service principal created in AAD, as an Application User with the role of “System Administrator” to the dataverse environment

So, now your CI/CD processes can use more SPN based identities to deploy applications in Power Platform!

Assign user not erroring out on duplicate group entry.

When running the pac admin assign-user command, with a group name that is already in the environment, the command will not error out, this was a popular ask for obvious reasons.

Model Builder now generates entities for Virtual Attributes

The pac modelbuilder build command now has the ability to generate the classes for Virtual Attributes using the parameter –emitvirtualattributes, this capability now allows users to access “name” properties that are stored in the formatted values property bag

A computer screen with white text Description automatically generated

A screen shot of a computer Description automatically generated

Figure 1: example of running Model builder.

In addition, we have added the etc emission with the –emitentityetc parameter, which allows for less noisy diff when putting the classes in source control repositories

The comments in the generated files that which highlighted the versions are no longer there in the comments of the code

A screen shot of a computer Description automatically generated

Figure 2: removed the comments

Support for Managed Environments (Behind the feature flag)

Yes, this is still behind a feature flag, but you can try it out and give us feedback, for those of you who know how to enable and disable feature flags. We have added a new sub command called set-governance-config. You need to set have the protection level set to standard, which will enable the Managed environments capability, if you select basic then Managed environments will be disabled.

A screenshot of a computer screen Description automatically generated

In the example above I have enabled managed environments and enabled limited sharing. We will eventually be bringing it out of the feature flag mode. In the interim, feedback is welcome.

PCF Control updates

PCF Push when CLI is installed using dotnet tools

When we introduced the ability to install using dotnet tools. We accidentally broke the pac pcf push command in the dotnet tool installation. I am glad to announce that we have fixed it

Solution customization prefix is now optional during pcf push

We have enabled some defaults in the PCF init command, for example when you did PCF push the default prefix was dev for the solution wrapper, well now it is no longer dev, it can be whatever you like

A computer screen shot of a black screen Description automatically generated

A screenshot of a computer Description automatically generated

The generated solution wrapper is no longer PowerApptools_Dev.zip but the control name, which makes it a little more intuitive.

A screen shot of a computer Description automatically generated

We would be happy if you could try it out and provide us with feedback, in fact in this new build we have a new message, which shows exactly where to provide it. That is at https://github.com/microsoft/powerplatform-build-tools/discussions. Looking forward to seeing you there.

0 comments

Discussion is closed.

Feedback usabilla icon