locked
PowerShell workflow for Azure issue RRS feed

All replies

  • Please post your code using the code posting tool provided. Edit this post and fix the code. Do not just open a new question.

    Thank you.


    \_(ツ)_/


    • Edited by jrv Sunday, February 25, 2018 7:28 AM
    Sunday, February 25, 2018 7:27 AM
  • This is what you code looks like when formatted correctly.  From the code it is impossible to understand what you are trying to do.

    An "inlinescript" can only be used in a workflow.

    # case 1
    $Paramsdeploy = InlineScript{        
         $DParams = @{}
         $DParams.Add('Details',$using:paramFile.Details) 
         $DParams.Add('server3','test')       
         $DParams
         New-AzureRmResourceGroupDeployment -Name param `
             -ResourceGroupName Automation-Bhaskar `
             -TemplateFile C:\Users\bhaskar\Desktop\NSGObject.json `
             -TemplateParameterObject $deployParams `
             -Verbose
    }
    
    #case 2
    $Paramsdeploy = InlineScript{        
        $DParams = @{}
        $DParams.Add('Details',$using:paramFile.Details) 
        $DParams.Add('server3','test')       
        $DParams
    }
    
    New-AzureRmResourceGroupDeployment -Name param `
             -ResourceGroupName Automation-Bhaskar `
             -TemplateFile C:\Users\bhaskar\Desktop\NSGObject.json `
             -TemplateParameterObject $Paramsdeploy `
             -Verbose


    \_(ツ)_/

    Sunday, February 25, 2018 7:35 AM