Invoke ADF pipeline using powershell script

Josh 46 Reputation points
2023-01-18T05:06:11.7533333+00:00
i have run the below code but it does not seems to be. i'm geting below rerror

Invoke-AzDataFactoryV2Pipeline : The term 'Invoke-AzDataFactoryV2Pipeline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the





Login-AzureRmAccount  
Select-AzureRmSubscription -Subscription "yourSubId"  
  
$dfname = "youDataFActoryName"  
$rgName = "yourResourceGroupName"  
$pipe = "pipeName"  
Invoke-AzureRmDataFactoryV2Pipeline -DataFactoryName $dfname -ResourceGroupName $rgName -PipelineName $pipe
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,677 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,508 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 32,336 Reputation points MVP
    2023-01-18T08:04:23.4266667+00:00

    Install the module Az.DataFactory based on the error message

    0 comments No comments

  2. PRADEEPCHEEKATLA-MSFT 89,376 Reputation points Microsoft Employee
    2023-01-18T10:24:28.29+00:00

    Hello @Josh,

    Thanks for the question and using MS Q&A platform.

    You are experiencing this issue due to - The AzureRM PowerShell module is no longer recommended as this modules has been deprecated

    To resolve this issue - I would suggest you to use The Az PowerShell module is the recommended PowerShell module for managing Azure resources on all platforms

    Login-AzAccount 
    Select-AzSubscription -Subscription "bXXXXX-XXXXXX-XXXXXX-XXXXf"  
      
    $dfname = "chepra"  
    $rgName = "Analytics-Resources"  
    $pipe = "TestingCopy"  
    Invoke-AzDataFactoryV2Pipeline -DataFactoryName $dfname -ResourceGroupName $rgName -PipelineName $pipe
    

    I'm able to Invokes a pipeline to start a run for it using the above powershell script.

    User's image

    Successfully able to run the pipeline using the above command.

    User's image

    For more details, refer to Invoke-AzDataFactoryV2Pipeline

    Hope this helps. Do let us know if you any further queries.


    Please don’t forget to Accept Answer and wherever the information provided helps you, this can be beneficial to other community members.


Your answer

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