Adds a script action to a cluster configuration object.


   [-Config] <AzureHDInsightConfig>
   [-NodeType] <ClusterNodeType>
   [-Uri] <Uri>
   [-Name] <String>
   [[-Parameters] <String>]
   [-DefaultProfile <IAzureContextContainer>]


The Add-AzHDInsightScriptAction cmdlet adds script actions to the HDInsight configuration object created by the New-AzHDInsightClusterConfig cmdlet. Script actions provide functionality that is used to install additional software or to change the configuration of applications that run on a Hadoop cluster by using Windows PowerShell or Bash scripts (for Windows or Linux clusters, respectively). A script action runs on the cluster nodes when HDInsight clusters are deployed, and they run after nodes in the cluster complete HDInsight configuration. The script action runs under system administrator account privileges and provides full access rights to the cluster nodes. You can provide each cluster with a list of script actions to run in a specified sequence.


Example 1: Add a script action to the cluster configuration object

PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountResourceId = "yourstorageaccountresourceid"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Script action info
PS C:\> $scriptActionName = "