The documentation for the cmdlets for HDInsight are not up to date, and therefore neither is the Get-Help on this one (today: July 1st 2014). I’m not sure if I’m misunderstanding something, or if the docs aren’t documented. But, If you run a simple cmdlet such as:
Get-AzureHDInsightCluster -Subscription (Get-AzureSubscription -Current).SubscriptionId
You will get the following error:
The -Subscription parameter is deprecated, Please use Select-AzureSubscription –Current
Funny enough if you run Get-help Get-AzureHDInsightCluster -Examples
You will see:
Retrieves and lists all of the Windows Azure HDInsight clusters associated with the current subscription or retrieves a specific named cluster.
Clusters in a subscription
PS C:\>Get-AzureHDInsightCluster -Subscription (Get-AzureSubscription -Current).SubscriptionId
Get information about the clusters associated with a specified subscription.
What you should do instead is select the subscription like so (use whatever sub name you have/want):
Select-AzureSubscription “Visual Studio Ultimate med MSDN”
This sets it for the entire session, and you can simply call the HDInsight get cmdlet without any params:
In case you don’t know how to add:
And how to get a list of your subscriptions
Here is one more example from the interesting Get-Help result… looks like it needs some cleaning up 🙂