This page contains Windows bias

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
⚠️ windows_tools
Summary:
The documentation provides both Azure CLI and Azure PowerShell examples, but PowerShell is given equal or greater prominence throughout, including detailed usage patterns (e.g., background jobs) that are specific to PowerShell and Windows environments. The PowerShell section is as detailed as the CLI section, and sometimes includes advanced usage (e.g., jobs) not mirrored for CLI. There is no mention of Linux-specific shells or scripting environments, and PowerShell is presented as a primary tool, which may bias the documentation toward Windows users. No explicit Linux examples or notes about running CLI commands in Bash or other Linux shells are present.
Recommendations:
  • Add explicit Bash/Linux shell examples alongside Azure CLI commands, including sample usage in Bash scripts.
  • Clarify that Azure CLI commands are cross-platform and can be run in Bash, PowerShell, or other shells, and provide examples for both environments.
  • Where advanced PowerShell usage is shown (e.g., jobs), provide equivalent Bash/Linux scripting patterns (e.g., backgrounding CLI commands with & or using nohup).
  • Mention that Azure CLI is available on Linux, macOS, and Windows, and provide links or notes for installing and using it on Linux.
  • Balance the order of presentation so that CLI and Bash/Linux examples are not always after PowerShell, and avoid giving PowerShell exclusive advanced usage coverage.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-12 00:58 #8 cancelled ✅ Clean
2025-07-10 05:06 #7 processing ✅ Clean

Flagged Code Snippets

You can have PowerShell wait for the asynchronous call to complete before providing the results output or have it run in the background as a [job](/powershell/module/microsoft.powershell.core/about/about_jobs). To use a PowerShell job to run the compliance scan in the background, use the `AsJob` parameter and set the value to an object, such as `$job` in this example:
### Azure PowerShell You can run the following commands from Azure Cloud Shell. Get the state summary for the topmost assigned policy with the highest number of non-compliant resources.
You can choose not to wait for the asynchronous process to complete before continuing with the `no-wait` parameter. #### On-demand evaluation scan using Azure PowerShell The compliance scan is started with the [Start-AzPolicyComplianceScan](/powershell/module/az.policyinsights/start-azpolicycompliancescan) cmdlet. By default, `Start-AzPolicyComplianceScan` starts an evaluation for all resources in the current subscription. To start an evaluation on a specific resource group, use the `ResourceGroupName` parameter. The following example starts a compliance scan in the current subscription for a resource group. Replace `resourceGroupName` with your resource group's name:
You can check on the status of the job by checking on the `$job` object. The job is of the type `Microsoft.Azure.Commands.Common.AzureLongRunningJob`. Use `Get-Member` on the `$job` object to see available properties and methods. While the compliance scan is running, checking the `$job` object outputs results such as these:
Get the state record for the most recently evaluated resource and the output default is by timestamp in descending order.
Get events related to non-compliant virtual network resources that occurred after a specific date. Use the `From` parameter with a date in ISO 8601 format.
The output includes a `PrincipalOid` property that can be used to get a specific user with the Azure PowerShell cmdlet `Get-AzADUser`. Replace `{principalOid}` with the value you get from the previous command.