PowerShell Runbook failing on Azure Automation Account

Vivek Komarla Bhaskar 956 Reputation points
2024-01-26T12:20:26.9866667+00:00

Hi, The following error is displayed when I run the PowerShell Runbook that I created on my Azure Automation account to enable/disable SFTP on my Azure storage account (gen2). Could you please help me with this? Screenshot 2024-01-26 at 12.14.20

Screenshot 2024-01-21 at 23.32.49

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Answer accepted by question author
  1. tbgangav-MSFT 10,431 Reputation points Moderator
    2024-01-27T04:04:32.39+00:00

    Hi @Vivek Komarla Bhaskar ,

    I believe you have either of the below 2 ways to overcome the issue:

    1. If you connect to Azure using Az PowerShell cmdlet Connect-AzAccount then use Az PowerShell cmdlet Set-AzStorageAccount to enable and disable sftp.
    2. As per this update as Az CLI is now supported in Azure Automation PowerShell 7.2 runtime runbooks so if you want to use Az CLI command az storage account update to enable or disable sftp then before using it, connect to Azure using Az CLI command az login.

    If you still face any issues while trying either of the ways, let me know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.