Unable to create HDInsight cluster using azure powershell

Kareem Abdul 1 Reputation point
2021-02-10T22:00:38.47+00:00

Unable to Create a HDInsight cluster using the below link
https://learn.microsoft.com/en-in/azure/hdinsight/hdinsight-administer-use-powershell

New-AzHDInsightCluster:
Line |
10 | -DefaultStorageAccountName "$defaultStorageAccountName.blob.core. …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'DefaultStorageAccountName'.

Facing the issue above

Attached66695-error.png screenshot , Please help

Azure HDInsight
Azure HDInsight
An Azure managed cluster service for open-source analytics.
199 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 77,081 Reputation points Microsoft Employee
    2021-02-11T10:36:53.287+00:00

    Hello @Kareem Abdul ,

    Welcome to the Microsoft Q&A platform.

    Thanks for bringing this to our attention. Currently, I’m working the docs team to update the document accordingly.

    While using New-AzHDInsightCluster you will receive this error message because there is no parameter called DefaultStorageAccountName.

    As per the Az.HDInsight powershell commands release notes:

    * For New-AzHDInsightCluster cmdlet:  
        - Replaced parameter 'DefaultStorageAccountName' with 'StorageAccountResourceId'  
        - Replaced parameter 'DefaultStorageAccountKey' with 'StorageAccountKey'  
        - Replaced parameter 'DefaultStorageAccountType' with 'StorageAccountType'  
        - Removed parameter 'PublicNetworkAccessType'  
        - Removed parameter 'OutboundPublicNetworkAccessType'  
        - Added new parameters: 'StorageFileSystem' and 'StorageAccountManagedIdentity' to support ADLSGen2  
        - Added new parameter 'EnableIDBroker' to Support HDInsight ID Broker  
        - Added new parameters: 'KafkaClientGroupId', 'KafkaClientGroupName' and 'KafkaManagementNodeSize' to support Kafka Rest Proxy.  
    

    Reference: https://www.powershellgallery.com/packages/Az.HDInsight/4.0.0

    You can try to create HDInsight cluster using the examples mentioned here: https://learn.microsoft.com/en-us/powershell/module/az.hdinsight/new-azhdinsightcluster?view=azps-5.5.0#examples

    # Primary storage account info  
            $storageAccountResourceGroupName = "Group"  
            $storageAccountResourceId = "yourstorageaccountresourceid"  
            $storageAccountName = "yourstorageacct001"  
            $storageAccountKey = Get-AzStorageAccountKey `  
                -ResourceGroupName $storageAccountResourceGroupName `  
                -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}  
            $storageContainer = "container002"  
      
            # Cluster configuration info  
            $location = "East US 2"  
            $clusterResourceGroupName = "Group"  
            $clusterName = "your-hadoop-002"  
            $clusterCreds = Get-Credential  
      
            # If the cluster's resource group doesn't exist yet, run:  
            # New-AzResourceGroup -Name $clusterResourceGroupName -Location $location  
      
            # Create the cluster  
            New-AzHDInsightCluster `  
                -ClusterType Hadoop `  
                -ClusterSizeInNodes 4 `  
                -ResourceGroupName $clusterResourceGroupName `  
                -ClusterName $clusterName `  
                -HttpCredential $clusterCreds `  
                -Location $location `  
                -StorageAccountResourceId $storageAccountResourceId `  
                -StorageAccountKey $storageAccountKey `  
                -StorageContainer $storageContainer `  
                -SshCredential $clusterCreds   
    

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

    ------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.

  2. Kareem Abdul 1 Reputation point
    2021-03-02T21:24:02.203+00:00

    Primary storage account info

         $storageAccountResourceGroupName = "datafence-storage-rg"
         $storageAccountResourceId = "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/datafence-storage-rg/providers/Microsoft.Storage/storageAccounts/datafencestorage123"
         $storageAccountName = "datafencestorage123"
         $storageAccountKey = Get-AzStorageAccountKey `
             -ResourceGroupName $storageAccountResourceGroupName `
             -Name $storageAccountName | Where-Object {$_.KeyName -eq "key1"} | %{$_.Value}
         $storageContainer = "container002"
    
         # Cluster configuration info
         $location = "East US"
         $clusterResourceGroupName = "datafence-storage-rg"
         $clusterName = "hdinsightcluster"
         $clusterCreds = Get-Credential
    
         # If the cluster's resource group doesn't exist yet, run:
         # New-AzResourceGroup -Name $clusterResourceGroupName -Location $location
    
         # Create the cluster
         New-AzHDInsightCluster `
             -ClusterType Hadoop `
             -ClusterSizeInNodes 4 `
             -ResourceGroupName $clusterResourceGroupName `
             -ClusterName $clusterName `
             -HttpCredential $clusterCreds `
             -Location $location `
             -StorageAccountResourceId $storageAccountResourceId `
             -StorageAccountKey $storageAccountKey `
             -StorageContainer $storageContainer `
             -SshCredential $clusterCreds
    		 
    		 
    
    0 comments No comments