Sad Tux - Windows bias detected
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

Detected Bias Types
powershell_heavy
windows_tools
windows_first
Summary
The documentation page is generally cross-platform, focusing on the Azure portal and Azure CLI, both of which are available on Windows, Linux, and macOS. However, there are subtle signs of Windows bias: PowerShell-specific tips are included, and Windows Terminal is mentioned as an example app for Cloud Shell. There are no Linux- or macOS-specific shell tips or examples, and no mention of Linux terminals or shell environments. The PowerShell escaping tip is repeated, but no equivalent bash/zsh guidance is provided.
Recommendations
  • Add bash/zsh shell escaping tips alongside PowerShell tips, especially for JSON quoting and escaping.
  • When mentioning terminal applications (e.g., Windows Terminal), also mention common Linux (e.g., GNOME Terminal, Konsole) and macOS (Terminal.app, iTerm2) terminals.
  • Explicitly state that the Azure CLI commands work on Linux, macOS, and Windows, and provide example shell commands for both bash and PowerShell where quoting/escaping differs.
  • If providing PowerShell-specific notes, provide equivalent notes for bash/zsh users.
  • Consider including a short section or tip for Linux/macOS users regarding common pitfalls or differences in command-line usage.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-14 00:00 #250 in_progress Biased Biased
2026-01-13 00:00 #246 completed Biased Biased
2026-01-11 00:00 #240 completed Biased Biased
2026-01-10 00:00 #237 completed Biased Biased
2026-01-09 00:34 #234 completed Biased Biased
2026-01-08 00:53 #231 completed Biased Biased
2026-01-06 18:15 #225 cancelled Clean Clean
2025-08-17 00:01 #83 cancelled Clean Clean
2025-07-13 21:37 #48 completed Biased Biased
2025-07-12 23:44 #41 cancelled Biased Biased
2025-07-09 13:09 #3 cancelled Clean Clean
2025-07-08 04:23 #2 cancelled Biased Biased

Flagged Code Snippets

>[!TIP]
>If you're using PowerShell, add a backslash `\` to escape any double quotes. For example: `--tags '{\"country\":\"US\"}'`.

---

## Query for device twins

IoT Hub exposes the device twins for your IoT hub as a document collection called **devices**. You can query devices based on their device twin values.

This section describes how to run twin queries in the Azure portal and Azure CLI. To learn how to write twin queries, see [Queries for IoT Hub device and module twins](./query-twins.md).

### [Azure portal](#tab/portal)

1. In the [Azure portal](https://portal.azure.com), navigate to your IoT hub.

1. In your IoT hub, select **Devices** from the **Device management** section of the navigation menu.

1. You can either use a filter or a query to find devices based on their device twin details:

   * **Find devices using a filter**:

     1. Finding devices using a filter is the default view in the Azure portal. If you don't see these fields, select **Find devices using a filter**.

     1. Select **Add filter**, and then select **Device tag** as the filter type from the drop-down menu.

     1. Enter the desired tag name and value, select **Apply** to retrieve the list of devices that matches the criteria.

        :::image type="content" source="./media/manage-device-twins/filter-device-twin-tags.png" alt-text="Screenshot of filtering devices with tags.":::

   * **Find devices using a query**:

     1. Select **Find devices using a query**.

     1. Enter your query into the text box, then select **Run query**.

        :::image type="content" source="./media/manage-device-twins/run-query.png" alt-text="Screenshot that shows using the device query filter in the Azure portal.":::

### [Azure CLI](#tab/cli)

Use the [az iot hub query](/cli/azure/iot/hub#az-iot-hub-query) command to return device information based on device twin or module twin queries.