Create, Start, and Monitor Schedule Trigger with Azure PowerShell | DP-203 Exam Guide

Create a Trigger with Azure PowerShell

Question

You have been tasked to create, start, and monitor a schedule trigger using Azure PowerShell.

Which of the following cmdlet would you use in PowerShell to create a trigger?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answer: A

You need to use Set-AzDataFactoryV2Trigger cmdlet for creating trigger.

Set-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName
$DataFactoryName -Name "MyTrigger" -DefinitionFile
"C:\ADFv2QuickStartPSH\MyTrigger. json”

Option A is correct.

A trigger is created by using the Set-AzDataFactoryV2Trigger cmdlet.

Option B is incorrect.

Set-ADFV2Trigger is not the right command to create a trigger.

Option C is incorrect.

Get-AzDataFactoryV2Trigger is used to confirm the status of the trigger.

Option D is incorrect.

Start-AzDataFactoryV2Trigger is the right command to start a trigger.

Option E is incorrect.

Start-ADFV2Trigger is not the right command.

Reference:

To know more about schedule trigger, please visit the below given link:

The correct cmdlet to create a trigger in Azure PowerShell is A. Set-AzDataFactoryV2Trigger.

Explanation:

Azure PowerShell is a command-line tool that allows you to manage and automate Azure resources. In order to create, start, and monitor a schedule trigger using Azure PowerShell, we need to use the appropriate cmdlets.

The cmdlets available for managing Azure Data Factory (ADF) version 2 resources are prefixed with "AzDataFactoryV2" or "ADFV2". In this case, we are working with a trigger, so we should look for cmdlets with "Trigger" in the name.

Out of the options provided, the cmdlets that are related to triggers are Set-AzDataFactoryV2Trigger and Set-ADFV2Trigger. The prefix "Az" in the first cmdlet stands for "Azure," which indicates that this is the Azure-specific version of the cmdlet. On the other hand, the second cmdlet does not have the "Az" prefix and uses "ADFV2" instead of "AzDataFactoryV2." This suggests that the second cmdlet may be specific to the ADF version 2 service.

Therefore, the correct cmdlet to create a trigger using Azure PowerShell is A. Set-AzDataFactoryV2Trigger.

The cmdlet C. Get-AzDataFactoryV2Trigger can be used to retrieve information about existing triggers. The cmdlet D. Start-AzDataFactoryV2Trigger and E. Start-ADFV2Trigger can be used to manually start a trigger.