web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using the PowerShell f...
Power Apps
Unanswered

Using the PowerShell for PowerApps cmdlets within an Azure Runbook (PowerShell)?

(0) ShareShare
ReportReport
Posted on by

HI,

I would like to create an Azure Runbook (PowerShell) using some of the PowerShell for PowerApps cmdlets.

 

Todo this I need to manually add the Module to the Azure Automation Account.  When trying to import the zip folder of files (https://docs.microsoft.com/en-us/powerapps/administrator/powerapps-powershell#installation) i get a "Importing of module failed" message with an error of:

 

Error importing the module PowerAppsCmdlets-V5. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: Cannot import the module of name PowerAppsCmdlets-V5, as the module structure was invalid.

 

Is this possible?

I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @Anonymous,

    Could you please share more details about the error message on your side?

    Further, could you please share a bit more about the PowerApps cmdlets you used within your PowerShell window?

    I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:4.JPG

     

    5.JPG

    Please take a try to use the following PowerApps cmdlets to import PowerApps module within your PowerShell window:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
    dir . | Unblock-File
    Import-Module .\Microsoft.PowerApps.Administration.PowerShell.psm1 -Force
    Import-Module .\Microsoft.PowerApps.PowerShell.psm1 -Force
    Add-PowerAppsAccount

    Please check and see if the following blog would help in your scenario:

    https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

    Note: Please go into the unziped PowerShell script file (download here) firstly, then run your Windows PowerShell as Administrator.

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    on at

    Thanks for your reply Kris.

     

    I have no trouble using the cmdlets and retrieving results using the zipped files on my local machine as you've described..

     

    What i'm struggling with is how I now replicate this using code using an Azure Runbook which we will used to automate some admin tasks we have.  I can't find a way of importing the modules needed into the Modules container within the Azure Automation Account which is needed for me to use the cmdlets (https://docs.microsoft.com/en-us/azure/automation/automation-runbook-gallery)

     

    The error messages are given when trying to import the Ziped folder into the Modules container.

     

    Error importing the module PowerAppsCmdlets-V5. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: Cannot import the module of name PowerAppsCmdlets-V5, as the module structure was invalid.

  • v-xida-msft Profile Picture
    on at

    Hi @Anonymous,

    Do you want to import PowerApps cmdlets module into your Azure Runbook?

    Based on the error message that you provided, I think there is no way to import PowerApps cmdlets module into a Azure Runbook currently.

    If you want to get further help in this issue, please submit an assisted support ticket through the following link:

    https://powerapps.microsoft.com/en-us/support/pro/

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    on at

    Once again thanks for your reply.

     

    The good news is that it looks like MS have published the PowerApps modules into the Modules library on the 4th January.  Excellent timing.

      

    Cheers

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard