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
⚠️
missing_linux_example
⚠️
windows_tools
⚠️
windows_first
Summary:
The documentation page demonstrates a strong Windows bias by exclusively providing Azure PowerShell examples and instructions for deploying and cleaning up resources. There are no examples or instructions for using Azure CLI, Bash, or other cross-platform tools commonly used on Linux/macOS. The workflow assumes the use of Azure Cloud Shell in PowerShell mode, and all scripts and command references are PowerShell-specific. There is no mention of Linux-specific tools or alternative command-line approaches, and the only linked tutorial is also PowerShell-focused.
Recommendations:
- Add equivalent Azure CLI (az) command examples for all deployment and cleanup steps, as Azure CLI is cross-platform and widely used on Linux/macOS.
- Explicitly mention that Azure Cloud Shell supports both Bash and PowerShell, and provide instructions for both environments.
- Include Bash script examples for users who prefer scripting in Bash.
- Ensure that references to commands and tools are not PowerShell-exclusive; provide links to both PowerShell and CLI documentation where appropriate.
- Consider restructuring sections so that cross-platform tools (like Azure CLI) are presented before or alongside PowerShell, rather than only after or not at all.
Create pull request
Flagged Code Snippets
$resourceGroupName = Read-Host -Prompt "Enter a resource group name (i.e. ExampleGrouprg)"
$emailAddress = Read-Host -Prompt "Enter an email address for a user in your directory"
$location = Read-Host -Prompt "Enter a location (i.e. centralus)"
$roleAssignmentName = New-Guid
$principalId = (Get-AzAdUser -Mail $emailAddress).id
$roleDefinitionId = (Get-AzRoleDefinition -name "Virtual Machine Contributor").id
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.authorization/rbac-builtinrole-resourcegroup/azuredeploy.json"
New-AzResourceGroup -Name $resourceGroupName -Location $location
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -roleDefinitionID $roleDefinitionId -principalId $principalId
PS> New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -roleAssignmentName $roleAssignmentName -roleDefinitionID $roleDefinitionId -principalId $principalId
DeploymentName : azuredeploy
ResourceGroupName : ExampleGrouprg
ProvisioningState : Succeeded
Timestamp : 5/22/2020 9:01:30 PM
Mode : Incremental
TemplateLink :
Uri : https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.authorization/rbac-builtinrole-resourcegroup/azuredeploy.json
ContentVersion : 1.0.0.0
Parameters :
Name Type Value
==================== ========================= ==========
roleDefinitionID String 9980e02c-c2be-4d73-94e8-173b1dc7cf3c
principalId String {principalId}
Outputs :
DeploymentDebugLogLevel :
$emailAddress = Read-Host -Prompt "Enter the email address of the user with the role assignment to remove"
$resourceGroupName = Read-Host -Prompt "Enter the resource group name to remove (i.e. ExampleGrouprg)"
$principalId = (Get-AzAdUser -Mail $emailAddress).id
Remove-AzRoleAssignment -ObjectId $principalId -RoleDefinitionName "Virtual Machine Contributor" -ResourceGroupName $resourceGroupName
Remove-AzResourceGroup -Name $resourceGroupName