Invoke-AzDataFactoryV2Pipeline unable to run

Dong, James 57 Reputation points
2022-12-06T03:13:04.207+00:00

In PowerShell Azure Module, if try to run Invoke-AzDataFactoryV2Pipeline cmdlet, no matter what is input into, existing or not existing, it always complain "Object reference not set to an instance of an object". Can you please help how to make this cmdlet work.

Below is an example of error:

PS C:\apps\dev\comm> Invoke-AzDataFactoryV2Pipeline

cmdlet Invoke-AzDataFactoryV2Pipeline at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
ResourceGroupName: test
DataFactoryName: test
PipelineName: test
Invoke-AzDataFactoryV2Pipeline : Object reference not set to an instance of an object.
At line:1 char:1

  • Invoke-AzDataFactoryV2Pipeline
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : CloseError: (:) [Invoke-AzDataFactoryV2Pipeline], NullReferenceException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.InvokeAzureDataFactoryPipelineCommand
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,657 questions
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2022-12-07T22:29:08.103+00:00

    Looking at the syntax for that cmdlet, it appears that there are one of two sets of parameters required. You can supply these three:

    [-ResourceGroupName] <String>
    [-DataFactoryName] <String>
    [-PipelineName] <String>

    Or this one:

    [-InputObject] <PSPipeline>

    Is it possible that one (or more) of the string values you've supplied is not named "test"?

    Can you use the Get-AzDataFactoryV2Pipeline cmdlet to get the desired pipeline and pipe the object to the Invoke-AzDataFactoryV2Pipeline?

    You should also check the version of the module. Perhaps there's a newer version available.


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.