'Get-AzDataFactoryV2Trigger' is not recognized as a name of a cmdlet, function, script file, or executable program

gaur 211 Reputation points
2021-11-08T13:54:03.433+00:00

I am using below task for stopping the trigger condition in azure datafactory . Can you please suggest what is wrong in below task

  • task: AzurePowerShell@5
    displayName: 'Inline Azure Powershell'
    inputs:
    azureSubscription: ${{ parameters.ServiceConnection}}
    ScriptType: 'InlineScript'
    azurePowerShellVersion: 'LatestVersion'
    PreferredAzurePowerShellVersion: '2.3.2'
    Inline:
    $triggersADF = Get-AzDataFactoryV2Trigger -DataFactoryName "${{ parameters.DataFactory }}" -ResourceGroupName "${{ parameters.ResourceGroup}}"
    $triggersADF | ForEach-Object { Stop-AzDataFactoryV2Trigger -ResourceGroupName "${{ parameters.ResourceGroup }}" -DataFactoryName "${{ parameters.DataFactory}}" -Name $_.name -Force }

Error - 'Get-AzDataFactoryV2Trigger' is not recognized as a name of a cmdlet, function,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,517 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,359 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. KANNIBALA MISKIN KANNISAH 31 Reputation points
    2022-10-19T04:27:00.16+00:00

    any updates on this issue?

    0 comments No comments