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
⚠️ missing_linux_example
⚠️ windows_tools
Summary:
The documentation page exclusively provides PowerShell-based examples and scripts for integrating Azure Automation runbooks into Site Recovery recovery plans. There are no examples or guidance for users who may prefer or require Linux-based scripting (e.g., Bash, Python) or cross-platform approaches. All module references and code samples are tailored to the Azure PowerShell module ecosystem, which is most familiar to Windows users. There is no mention of Linux tools, shell scripting, or how to achieve similar automation using non-Windows environments.
Recommendations:
  • Provide equivalent examples using Bash or Python runbooks, especially for common automation tasks.
  • Mention and link to documentation for cross-platform Azure Automation runbooks (e.g., Python, PowerShell Core).
  • Clarify which steps or scripts are Windows-specific and offer Linux alternatives where possible.
  • Include guidance on using Azure CLI (az) commands in runbooks for users on Linux or macOS.
  • Reference the ability to use hybrid worker groups that can run scripts on Linux machines, and provide examples.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-09-16 00:00 #113 completed ✅ Clean
2025-09-15 00:00 #112 completed ✅ Clean
2025-09-14 00:00 #111 completed ✅ Clean
2025-09-13 00:00 #110 completed ✅ Clean
2025-09-12 00:00 #109 completed ✅ Clean
2025-09-11 00:00 #108 completed ✅ Clean
2025-09-10 00:00 #107 completed ✅ Clean
2025-09-09 00:00 #106 completed ✅ Clean
2025-09-08 00:00 #105 completed ✅ Clean
2025-09-07 00:00 #104 completed ✅ Clean
2025-09-06 00:00 #103 completed ✅ Clean
2025-09-05 00:00 #102 completed ✅ Clean
2025-09-04 00:00 #101 completed ✅ Clean
2025-09-03 00:00 #100 completed ✅ Clean
2025-08-29 00:01 #95 completed ✅ Clean
2025-08-22 00:01 #88 completed ✅ Clean
2025-08-20 00:01 #86 completed ✅ Clean
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ❌ Biased
2025-07-12 23:44 #41 in_progress ❌ Biased

Flagged Code Snippets

workflow AddPublicIPAndNSG { param ( [parameter(Mandatory=$false)] [Object]$RecoveryPlanContext ) $RPName = $RecoveryPlanContext.RecoveryPlanName }
Connect-AzureRmAccount $sub = Get-AzureRmSubscription -Name <SubscriptionName> $sub | Select-AzureRmSubscription
param ( [parameter(Mandatory=$false)] [Object]$RecoveryPlanContext ) $VMinfo = $RecoveryPlanContext.VmMap | Get-Member | Where-Object MemberType -EQ NoteProperty | select -ExpandProperty Name $vmMap = $RecoveryPlanContext.VmMap foreach($VMID in $VMinfo) { $VM = $vmMap.$VMID if( !(($VM -eq $Null) -Or ($VM.ResourceGroupName -eq $Null) -Or ($VM.RoleName -eq $Null))) { #this check is to ensure that we skip when some data is not available else it will fail Write-output "Resource group name ", $VM.ResourceGroupName Write-output "Rolename " = $VM.RoleName } }
$NSGValue = $RecoveryPlanContext.RecoveryPlanName + "-NSG" $NSGRGValue = $RecoveryPlanContext.RecoveryPlanName + "-NSGRG" $NSGnameVar = Get-AutomationVariable -Name $NSGValue $RGnameVar = Get-AutomationVariable -Name $NSGRGValue
InlineScript { if (($Using:NSGname -ne $Null) -And ($Using:NSGRGname -ne $Null)) { $NSG = Get-AzureRmNetworkSecurityGroup -Name $Using:NSGname -ResourceGroupName $Using:NSGRGname Write-output $NSG.Id #Apply the NSG to a network interface #$vnet = Get-AzureRmVirtualNetwork -ResourceGroupName TestRG -Name TestVNet #Set-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name FrontEnd ` # -AddressPrefix 192.168.1.0/24 -NetworkSecurityGroup $NSG } }
$VMDetails = @{"VMGUID"=@{"ResourceGroupName"="RGNameOfNSG";"NSGName"="NameOfNSG"};"VMGUID2"=@{"ResourceGroupName"="RGNameOfNSG";"NSGName"="NameOfNSG"}} New-AzureRmAutomationVariable -ResourceGroupName <RG of Automation Account> -AutomationAccountName <AA Name> -Name <RecoveryPlanName> -Value $VMDetails -Encrypted $false
$VMDetailsObj = (Get-AzAutomationVariable -Name $RecoveryPlanContext.RecoveryPlanName).ToObject([hashtable])
$VMinfo = $RecoveryPlanContext.VmMap | Get-Member | Where-Object MemberType -EQ NoteProperty | select -ExpandProperty Name $vmMap = $RecoveryPlanContext.VmMap foreach ($VMID in $VMinfo) { $VMDetails = $VMDetailsObj[$VMID].ToObject([hashtable]); Write-output $VMDetails if ($VMDetails -ne $Null) { #If the VM exists in the context, this will not be Null $VM = $vmMap.$VMID # Access the properties of the variable $NSGname = $VMDetails.NSGName $NSGRGname = $VMDetails.NSGResourceGroupName # Add code to apply the NSG properties to the VM } }