Use Az Powershell module on SQL Managed Instance SQL Agent Job

TimB-0073 6 Reputation points
2022-10-03T00:48:37.67+00:00

Is it possible to use the Powershell Az module in an SQL Agent Job on Azure SQL Managed Instance? If so can anyone offer an example?

The notes on this page say "Importing external modules, such as dbatools and dbachecks, are not supported." but I thought being an Azure thing it might be different?

https://learn.microsoft.com/en-au/azure/azure-sql/managed-instance/job-automation-managed-instance?view=azuresql

Azure SQL Database
{count} vote

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 14,481 Reputation points Microsoft Employee
    2022-10-03T18:21:34.313+00:00

    Hi @TimB-0073 ,

    Welcome to Microsoft Q&A platform and thanks for using Azure Services.

    As Powershell is part of the underlying architecture,

    Powershell is not supported on SQL Agent Job in SQL Managed Instance.

    247109-image.png

    Reference Link: job-automation-managed-instance

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    1 person found this answer helpful.
    0 comments No comments