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
⚠️
windows_first
Summary:
The documentation provides both Azure CLI and Azure PowerShell examples for enabling duplicate message detection in Azure Service Bus. However, the PowerShell section is prominent and detailed, and PowerShell is a Windows-centric tool. There are no explicit Linux shell (bash) or cross-platform scripting examples outside of Azure CLI. The ordering places Azure CLI before PowerShell, but the PowerShell section is equally detailed and assumes familiarity with Windows scripting patterns. No Linux-specific tools or shell scripts are mentioned, and there is no explicit mention of running PowerShell Core cross-platform.
Recommendations:
- Clarify that Azure CLI is fully cross-platform and can be used on Linux, macOS, and Windows.
- Add bash shell examples alongside Azure CLI commands to demonstrate usage in a typical Linux environment.
- If including PowerShell, specify that PowerShell Core is available cross-platform, or clarify when examples are Windows-specific.
- Avoid assuming PowerShell as the default scripting tool; present CLI/bash examples first or in parallel.
- Consider including notes or links for Linux users on installing and using the Azure CLI and PowerShell Core.
Create pull request
Flagged Code Snippets
## Using Azure PowerShell
To **create a queue with duplicate detection enabled**, use the [`New-AzServiceBusQueue`](/powershell/module/az.servicebus/new-azservicebusqueue) command with `-RequiresDuplicateDetection` set to `$True`.
To **create a topic with duplicate detection enabled**, use the [`New-AzServiceBusTopic`](/powershell/module/az.servicebus/new-azservicebustopic) command with `-RequiresDuplicateDetection` set to `true`.
The above examples also set the size of the duplicate detection window by using the `-DuplicateDetectionHistoryTimeWindow` parameter. The window size is set to one day. The default value is 10 minutes and the maximum allowed value is seven days.
To **update a queue with a new detection window size**, see the following example. In this example, the window size is updated to seven days.