none
Found some issue Azure Automation service.

    Question

  • We are unable to automate or schedule power shell script in azure. 

    Requirement

    Automate power shell script in azure. The script inturn calling Azure pipeline with parameter file. Hence I would like to automate my power shell script in azure. 

    Have tried using ADF trigger option but unable to schedule power shell script using Trigger option. 

    based on my investigation I found Azure Automation is another option to schedule / automate power shell script. 

    Have created automation instance and created run book to call my power shell script.  But I am getting error when execute my runbook in automation service. 

    Getting below error

    Get-AzureRmDataFactoryV2PipelineRun : The term 'Get-AzureRmDataFactoryV2PipelineRun' is not recognized as the name of a 
    cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify 
    that the path is correct and try again.
    At line:22 char:12
    +     $run = Get-AzureRmDataFactoryV2PipelineRun -ResourceGroupName $rg ...
    +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Get-AzureRmDataFactoryV2PipelineRun:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    Looks like it configuration issue in azure automation power shell editor and it saying recognize Get-AzureRmDataFactoryV2PipelineRun command in power shell editory.

    Kindly help me to resolve this issue at the earliest. 

    thank you

    Arunachalam

    97909 11349



    Thursday, May 31, 2018 10:45 AM

All replies

  • Hi Arunachalam,

    The ADFv2 Powershell module is not installed by default in Azure Automation accounts.  To install the module, go to the Automation Account blade and select 'Modules':

    Click 'Browse gallery':

    Type 'datafactory' in the search field to find the ADFv2 modules and select it:

    Click the 'Import' button:

    If you get any dependencies errors, note the modules in the error and update or install them from the 'Modules' blade you visited earlier.

    Thursday, May 31, 2018 5:59 PM
    Moderator