Wednesday, 13 January 2016

Delete Script HDInsight Cluster

Login-AzureRmAccount
Import-AzurePublishSettingsFile "F:\Microsoft Azure Sponsorship-12-16-2015-credentials (2).publishsettings"
Get-AzureRmSubscription  # list your subscriptions and get your subscription ID
$subscriptionName="Microsoft Azure Sponsorship"
#Select-AzureRmSubscription -SubscriptionId "<Your Azure Subscription ID>"
Select-AzureRmSubscription -SubscriptionName $subscriptionName

$resourceGroupName = "hdinsight_southeastasia"

$storageAccountName = "XXXXXXXXXX"
$containerName = "XXXXXXXXXXX"

$clusterName = "XXXXXXXXXXXXX"
$location = "Southeast Asia"
$clusterNodes = "4"
$clusterType="HBase"
$ClusterVersion="3.2.7.757"

# Get the Storage account key
#$storageAccountKey = Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccountName | %{ $_.Key1 }
echo "Authentication Done ..!!!"
echo "Cluster deletion in Progress"
# Delete the HDInsight cluster
Remove-AzureRmHDInsightCluster -ClusterName $clusterName
echo "Cluster deleted"

1 comment:

  1. nice information well done your information is helping alot thanks for valuable windows azure training in hyderabad


    ReplyDelete