{"id":719,"date":"2023-10-27T15:25:30","date_gmt":"2023-10-27T22:25:30","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powerplatform\/?p=719"},"modified":"2023-10-27T16:10:01","modified_gmt":"2023-10-27T23:10:01","slug":"power-platform-command-line-interface-september-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powerplatform\/power-platform-command-line-interface-september-update\/","title":{"rendered":"Power Platform Command Line Interface: September Update"},"content":{"rendered":"<p>We are so happy to share new updates released in Power Platform CLI September update. There are a number of improvements that we want to share with our community to help them unblock, such as stage-and-upgrade solution import, create a developer environment on behalf-of, data import with multiple connections, and such.<\/p>\n<p>Also, I am excited to share that we have integrated Power Fx (low-code language for PowerApps) into our Power Platform CLI. This is just the beginning of this integration.<\/p>\n<p>Please keep sharing your feedback for further improvements.<\/p>\n<h2><strong>Power Fx Integration into Power Platform CLI (preview)<\/strong><\/h2>\n<p>In this September release we are introducing a new feature (in PREVIEW) for our developers to experience the power of Power Fx. Imagine that as a developer, you need to do a bulk data update to a Dataverse table but you either perform such operation manually or via the user interface. Now you can reduce the time and complexity of your Dataverse operations by using Power Fx from the command line or via a script.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1.jpg\" alt=\"Image pfx 1\" width=\"1594\" height=\"799\" class=\"aligncenter size-full wp-image-756\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1.jpg 1594w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1-300x150.jpg 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1-1024x513.jpg 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1-768x385.jpg 768w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/pfx-1-1-1536x770.jpg 1536w\" sizes=\"(max-width: 1594px) 100vw, 1594px\" \/><\/a><\/p>\n<p><strong>1&#46; Power-Fx REPL (Read-Evaluate-Print-Loop) command<\/strong><\/p>\n<p>This is an interactive shell for you to try ad-hoc queries, updates, and try different Power Fx expressions.<\/p>\n<pre><code>command: `pac power-fx repl`\n<\/code><\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/repl-2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/repl-2.png\" alt=\"Image repl 2\" width=\"940\" height=\"342\" class=\"aligncenter size-full wp-image-735\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/repl-2.png 940w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/repl-2-300x109.png 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/repl-2-768x279.png 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/a><\/p>\n<p><strong>2&#46; Power-Fx Run command (<em>using input file mode containing Power Fx logic<\/em>)<\/strong><\/p>\n<p>Here we want to share how a developer can write their Power Fx logic to automate their tasks. \u00a0<\/p>\n<p>command: <code>pac power-fx run --file &lt;File Name&gt;<\/code><\/p>\n<p>Here is an example of my file (test.txt) containing Power Fx expression, and the result is shown below.<\/p>\n<p>First, I want to query the first record in the Contacts table to understand the structure. Then I wanted to perform a check for value &#8220;a&#8221; found in string &#8220;asdf&#8221; and return &#8220;X&#8221; if found else &#8220;Y&#8221; as if I want to use comparisons. Lastly, just decided to query Contacts table for all records where column &#8220;fullname&#8221; contains &#8220;FName&#8221;. You can take this example and expand on by adding, deleting, or updating records.<\/p>\n<p><code>First(Contacts)<\/code><\/p>\n<p><code>Result = If( Mid( \"asdf\",1,1 ) = \"a\", \"X\", \"Y\" )<\/code><\/p>\n<p><code>Filter(Contacts, \"FName\" in fullname)<\/code><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run.png\" alt=\"Image PFX Run\" width=\"1251\" height=\"530\" class=\"aligncenter size-full wp-image-741\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run.png 1251w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run-300x127.png 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run-1024x434.png 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/PFX-Run-768x325.png 768w\" sizes=\"(max-width: 1251px) 100vw, 1251px\" \/><\/a><\/p>\n<p>This feature enables developers to use Power Fx formulas to automate their tasks more efficiently.<\/p>\n<p>We would love to hear from you about this Power-Fx capability in CLI and tell us about different scenarios you would like us to include at <a href=\"https:\/\/aka.ms\/pac\/PowerFx\">https:\/\/aka.ms\/pac\/PowerFx<\/a>.<\/p>\n<p>If you find bugs or want to have further discussions, please share them at <a href=\"https:\/\/aka.ms\/PowerFx\/Feedback\">https:\/\/aka.ms\/PowerFx\/Feedback<\/a>.<\/p>\n<h2><strong>Canvas Application<\/strong><\/h2>\n<p>In this release we are providing the ability to list your Canvas application in an environment. Now you can do that using the following command:<\/p>\n<p><code>pac canvas list<\/code><\/p>\n<p>You can also download the Canvas application as a .msapp file. You will need to provide the name of your Canvas application and you can view additional optional parameters using <code>pac canvas download help<\/code> command. In order to download Canvas application you need to use the below command:<\/p>\n<p><code>pac canvas download -- name &lt;App Name or App ID&gt;<\/code><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2.png\" alt=\"Image canvas 2\" width=\"1941\" height=\"799\" class=\"aligncenter size-full wp-image-744\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2.png 1941w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2-300x123.png 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2-1024x422.png 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2-768x316.png 768w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/canvas-2-1536x632.png 1536w\" sizes=\"(max-width: 1941px) 100vw, 1941px\" \/><\/a><\/p>\n<p>And there you have it. This was frequently asked for in the issue repository.<\/p>\n<h2><strong>Data import<\/strong><\/h2>\n<p>In this update, I am happy to announce that we are now providing our professional developers the ability to import data faster into their Power Platform environment by using the <code>--connection-count<\/code> property. If this parameter is not provided, the default connection count is set to 5.<\/p>\n<p><strong>NOTE:<\/strong> The data import capability is not available in Power Platform CLI when you install it using dotnet tool, so you will need to use it on Windows within either Visual Studio Code extension or by using the <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-platform\/developer\/cli\/introduction#install-power-platform-cli-for-windows\">MSI Installer<\/a>. This is because this capability uses .NET framework 4.x.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1.png\" alt=\"Image data import\" width=\"1324\" height=\"433\" class=\"aligncenter size-full wp-image-760\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1.png 1324w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1-300x98.png 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1-1024x335.png 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/data-import-1-768x251.png 768w\" sizes=\"(max-width: 1324px) 100vw, 1324px\" \/><\/a><\/p>\n<h2><strong>Solution Upgrade<\/strong><\/h2>\n<p>In the earlier releases, we introduced a way to easily upgrade a solution. Traditionally, you would have to first use <code>pac solution import --path &lt;solution-zip-file&gt; --import-as-holding<\/code> and then use <code>pac solution upgrade --solution-name &lt;solution-name&gt;<\/code>. This update is reducing the number of steps and saving time to upgrade your solution. Now with this improvement, you no longer need to have multiple steps to upgrade your solution, you can simply use below command:<\/p>\n<p><code>pac solution import --path &lt;solution-zip-file&gt; --stage-and-upgrade<\/code><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2.jpg\" alt=\"Image solution upgrade\" width=\"1928\" height=\"657\" class=\"aligncenter size-full wp-image-761\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2.jpg 1928w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2-300x102.jpg 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2-1024x349.jpg 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2-768x262.jpg 768w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/solution-upgrade-2-1536x523.jpg 1536w\" sizes=\"(max-width: 1928px) 100vw, 1928px\" \/><\/a><\/p>\n<h2><strong>Create an environment on behalf-of<\/strong><\/h2>\n<p>In the earlier releases, an administrator could only create up to three (3) developer environments (also known as personal environments). Administrators had limited control because they were only able to provision environments for themselves, and they were concerned about proper adherence to the deployment lifecycle process and <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-platform\/release-plan\/2023wave2\/power-platform-governance-administration\/govern-developer-environments\">governance<\/a>. By keeping administrator control and their concerns in mind, We are now making it easy to govern these developer environments by giving administrators the ability to deploy them on behalf of other users. This can be achieved using the following command, replacing the name of the environment and user as required:<\/p>\n<p><code>pac admin create --name \"DevEnvPACCLI\" --type \"Developer\" --user \"snizar@\"contoso.onmicrosoft.com\"<\/code><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1.jpg\" alt=\"Image user\" width=\"1758\" height=\"470\" class=\"aligncenter size-full wp-image-747\" srcset=\"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1.jpg 1758w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1-300x80.jpg 300w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1-1024x274.jpg 1024w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1-768x205.jpg 768w, https:\/\/devblogs.microsoft.com\/powerplatform\/wp-content\/uploads\/sites\/79\/2023\/10\/user-1-1536x411.jpg 1536w\" sizes=\"(max-width: 1758px) 100vw, 1758px\" \/><\/a><\/p>\n<p>We are so excited to get this release out, we hope you enjoy these new capabilities, and we are looking forward to hearing from you. As you try these capabilities out, please continue to provide your feedback at the following location: <a href=\"https:\/\/aka.ms\/pac\/feedback\">https:\/\/aka.ms\/pac\/feedback<\/a>.<\/p>\n<p>Also, don&#8217;t forget to join our Monthly Power Platform Pro-Dev Office Hours. You can find more information at <a href=\"https:\/\/aka.ms\/ProDevCommunity\">https:\/\/aka.ms\/ProDevCommunity<\/a>.<\/p>\n<p>Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are so happy to share new updates released in Power Platform CLI September update. There are a number of improvements that we want to share with our community to help them unblock, such as stage-and-upgrade solution import, create a developer environment on behalf-of, data import with multiple connections, and such. Also, I am excited [&hellip;]<\/p>\n","protected":false},"author":133706,"featured_media":773,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[19,21,15,2,36,11,28,23],"class_list":["post-719","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powerplatform","tag-code-first","tag-fusion-development","tag-lowcoderev","tag-powerapps","tag-power-platform","tag-cli","tag-power-platform-developer","tag-solutions"],"acf":[],"blog_post_summary":"<p>We are so happy to share new updates released in Power Platform CLI September update. There are a number of improvements that we want to share with our community to help them unblock, such as stage-and-upgrade solution import, create a developer environment on behalf-of, data import with multiple connections, and such. Also, I am excited [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/posts\/719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/users\/133706"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/comments?post=719"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/posts\/719\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/media\/773"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/media?parent=719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/categories?post=719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powerplatform\/wp-json\/wp\/v2\/tags?post=719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}