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.