I was trying to stop the ADF triggers during Deployment using YML. While it trying to execute the below powershell script, it throwing an exception.
Please help.
Script:
$triggersADF = Get-AzDataFactoryV2Trigger -DataFactoryName $DataFactoryName -ResourceGroupName $ResourceGroupName
$triggersADF | ForEach-Object { Stop-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_.name -Force -ErrorAction Ignore}
Error:
The term 'Get-AzDataFactoryV2Trigger' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\a\1\s\<>\Netic-SetADFTriggerState_Stop.ps1:11 char:1