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

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

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.
6,265 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.
4,618 questions
No comments
{count} votes

1 additional answer

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

    any updates on this issue?

    No comments