Azure: Create resource with PowerShell using parameterized JSON definition file

chrisw 81 Reputation points

I want to do something like what's shown below, but it's not working. How does one parameterize values inside a JSON configuration file and then pass in the parameter values on the PowerShell command line? Is it possible??

New-AzDataFactoryV2Pipeline -ResourceGroupName "rg-datafactory-dev" -Name "pipeline_outer" -DataFactoryName "df-datafactory-dev" -DefinitionFile "./pipeline_outer.json" -Parameter activityName="Run Notebook" activityType="DatabricksNotebook"

= pipeline_outer.json (parameterized)
"name": "pipeline_outer",
"properties": {
"activities": [
"name": "$activityName",
"type": "$activityType",
"dependsOn": [],
"policy": {

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,075 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 84,936 Reputation points Microsoft Employee

    Hello @chrisw ,

    Thanks for the question and using MS Q&A platform.

    Unfortunately, the PowerShell cmdlet doesn't allow you to pass the parameters.

    Reason: The PowerShell cmdlet (New-AzDataFactoryV2Pipeline) or (Set-AzDataFactoryV2Pipeline) syntax doesn't have parameter option in the syntax.

       [-Name] <String>  
       [-DefinitionFile] <String>  
       [-ResourceGroupName] <String>  
       [-DataFactoryName] <String>  
       [-DefaultProfile <IAzureContextContainer>]  


    For more details, refer to Azure Data Factory - Create a pipeline.

    Hope this helps. Do let us know if you any further queries.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

0 additional answers

Sort by: Most helpful