< Back

Set-AzureRmHDInsightDefaultStorage

Tue Jan 29, 2019 9:48 pm

NAME Set-AzureRmHDInsightDefaultStorage



SYNOPSIS

Sets the default Storage account setting in a cluster configuration object.





SYNTAX

Set-AzureRmHDInsightDefaultStorage [-Config] <AzureHDInsightConfig> [-StorageAccountName] <String> [[-StorageAccountKey] <String>]

[-DefaultProfile <IAzureContextContainer>] [-StorageAccountType {AzureStorage | AzureDataLakeStore}] [<CommonParameters>]





DESCRIPTION

The Set-AzureRmHDInsightDefaultStorage cmdlet sets the default Storage account setting in the Azure HDInsight cluster configuration object created

by the New-AzureRmHDInsightClusterConfig cmdlet.





PARAMETERS

-Config <AzureHDInsightConfig>

Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the

New-AzureRmHDInsightClusterConfig cmdlet.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StorageAccountKey <String>

Specifies the account key for the default Azure Storage account that the HDInsight cluster will use.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StorageAccountName <String>

Specifies the name of the default storage account that the HDInsight cluster will use.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StorageAccountType <StorageType>

Gets or sets the type of the default storage account. Defaults to AzureStorage



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

AzureHDInsightConfig

Parameter 'Config' accepts value of type 'AzureHDInsightConfig' from the pipeline





OUTPUTS

Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig







NOTES









Example 1: Set the default storage account for the cluster configuration object



PS C:\\># Primary storage account info

PS C:\\> $storageAccountResourceGroupName = "Group"

PS C:\\> $storageAccountName = "yourstorageacct001"

PS C:\\> $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value





PS C:\\>$storageContainer = "container002"



# Cluster configuration info

PS C:\\> $location = "East US 2"

PS C:\\> $clusterResourceGroupName = "Group"

PS C:\\> $clusterName = "your-hadoop-002"

PS C:\\> $clusterCreds = Get-Credential



# If the cluster's resource group doesn't exist yet, run:

# New-AzureRMResourceGroup -Name $clusterResourceGroupName -Location $location



# Create the cluster

PS C:\\> New-AzureRmHDInsightClusterConfig `

| Set-AzureRmHDInsightDefaultStorage `

-StorageAccountName "$secondStorageAccountName.blob.core.contoso.net" `

-StorageAccountKey $key2 `

-StorageContainer $storageContainer `

| New-AzureRmHDInsightCluster `

-ClusterType Hadoop `

-OSType Windows `

-ClusterSizeInNodes 4 `

-ResourceGroupName $clusterResourceGroupName `

-ClusterName $clusterName `

-HttpCredential $clusterCreds `

-Location $location



This command sets the default Storage account for a cluster configuration object.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ultstorage