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_first
⚠️
missing_linux_example
⚠️
windows_tools
Summary:
The documentation exclusively uses PowerShell for all scripting and automation examples, with no mention of Bash, Python, or other cross-platform scripting options. All runbook creation steps assume PowerShell as the language, and only PowerShell modules and cmdlets are referenced. There are no examples or guidance for users who prefer or require Linux-native tools or languages. The documentation also references Azure PowerShell as the next step, reinforcing a Windows-centric approach.
Recommendations:
- Provide equivalent examples using Azure CLI and/or Python runbooks, which are cross-platform and commonly used on Linux.
- Explicitly mention that Azure Automation supports Python and Bash runbooks, and link to relevant documentation.
- Include a section or callout for Linux users, outlining how to achieve the same tasks using Linux-native tools and scripting languages.
- Balance the order of presentation so that PowerShell and cross-platform alternatives are given equal prominence.
- Reference Azure CLI modules and commands for HDInsight cluster management alongside PowerShell examples.
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