Runing PowerShell script from Azure Automation via Workbook not working

radoslavov 1 Reputation point
2023-05-04T08:59:37.5566667+00:00

I hope someone here can help me, because apparently the guys behind the Azure chat support are clueless or have zero knowledge of what they are doing, it took two people to wast one hour to wonder around what the problem is. and then they send me to write this post and pray for someone to help! Amen!

Here is the story:

I'm trying to create an Azure Automation workbook to run Powers hell scripts again Power Platform such as get a list of all apps or flows, or connectors, or run script against SharePoint Online to submit a usage report for every site collection. Running everything locally in PS is working as expected, but in Azure not. After configuring the Credentials

User's image

and installing the required modules

User's image

Ruing for example this script which sends an email with all site collection storage usage, is not working

User's image

User's image

Same for PowerPlatform

User's image

User's image

In CMDLETS i dont see PowerPlafrom modules there on PnPOnline

User's image

any idea why cmds are not running in the cloud or what might be wrong here?

I follow instructions for both in this sites

https://www.sharepointdiary.com/2020/11/sharepoint-online-schedule-powershell-script-using-azure-automation.html

https://jamesyumnam.com/2021/08/31/run-powershell-for-powerapps-in-azure-runbook-and-send-the-outputs-to-power-apps-using-power-automate/

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
{count} votes