About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_tools
⚠️
missing_linux_example
⚠️
windows_first
Summary:
The documentation exclusively uses PowerShell for all scripting and automation examples, with no mention of alternatives such as Python or Bash. All runbooks are created as PowerShell scripts, and the only tooling referenced is Azure PowerShell modules. There are no examples or guidance for users who may prefer or require Linux-native tools, Bash scripting, or cross-platform automation languages. The structure and language assume PowerShell as the default, which is historically associated with Windows environments, even though Azure Automation supports Python runbooks and HDInsight clusters are often Linux-based.
Recommendations:
- Provide equivalent examples using Python runbooks, which are supported in Azure Automation and are cross-platform.
- Include Bash/CLI-based automation examples for users who prefer Linux-native scripting.
- Mention and link to Azure CLI and REST API alternatives for cluster management, not just PowerShell modules.
- Rephrase sections to refer to 'PowerShell or Python' runbooks, rather than only PowerShell.
- Add a note clarifying that PowerShell Core is cross-platform, but also highlight other supported scripting languages.
- Ensure screenshots and instructions are not exclusively tied to Windows/PowerShell environments.
Create pull request
Flagged Code Snippets
Param
(
[Parameter (Mandatory= $true)]
[String] $subscriptionID,
[Parameter (Mandatory= $true)]
[String] $resourceGroup,
[Parameter (Mandatory= $true)]
[String] $storageAccount,
[Parameter (Mandatory= $true)]
[String] $containerName,
[Parameter (Mandatory= $true)]
[String] $clusterName
)
### Authenticate to Azure
$Conn = Get-AutomationConnection -Name 'AzureRunAsConnection'
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
# Set cluster variables
$storageAccountKey = (Get-AzureRmStorageAccountKey –Name $storageAccount –ResourceGroupName $resourceGroup)[0].value
# Setting cluster credentials
#Automation credential for Cluster Admin
$clusterCreds = Get-AutomationPSCredential –Name 'cluster-password'
#Automation credential for user to SSH into cluster
$sshCreds = Get-AutomationPSCredential –Name 'ssh-password'
$clusterType = "Hadoop" #Use any supported cluster type (Hadoop, HBase, etc.)
$clusterOS = "Linux"
$clusterWorkerNodes = 3
$clusterNodeSize = "Standard_D3_v2"
$location = Get-AzureRmStorageAccount –StorageAccountName $storageAccount –ResourceGroupName $resourceGroup | %{$_.Location}
### Provision HDInsight cluster
New-AzureRmHDInsightCluster –ClusterName $clusterName –ResourceGroupName $resourceGroup –Location $location –DefaultStorageAccountName "$storageAccount.blob.core.windows.net" –DefaultStorageAccountKey $storageAccountKey -DefaultStorageContainer $containerName –ClusterType $clusterType –OSType $clusterOS –Version “3.6” –HttpCredential $clusterCreds –SshCredential $sshCreds –ClusterSizeInNodes $clusterWorkerNodes –HeadNodeSize $clusterNodeSize –WorkerNodeSize $clusterNodeSize
Param
(
[Parameter (Mandatory= $true)]
[String] $clusterName
)
### Authenticate to Azure
$Conn = Get-AutomationConnection -Name 'AzureRunAsConnection'
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
Remove-AzureRmHDInsightCluster -ClusterName $clusterName