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
⚠️
missing_linux_example
⚠️
windows_first
Summary:
The documentation page demonstrates a Windows bias by providing REST API examples exclusively in PowerShell, referencing PowerShell cmdlets throughout, and omitting equivalent Linux/bash/cURL examples. Windows tools and scripting patterns (PowerShell, Write-Host, Get-Date) are used without mention of cross-platform alternatives, and Windows-centric approaches are presented before or instead of Linux-friendly options.
Recommendations:
- For REST API sections, provide bash/cURL examples alongside or instead of PowerShell scripts to support Linux and macOS users.
- Explicitly mention that PowerShell examples are for Windows and provide equivalent bash or Python scripts for Linux environments.
- Where PowerShell cmdlets are referenced (e.g., Get-AzDataFactoryV2PipelineRun), note cross-platform alternatives or clarify their platform compatibility.
- Avoid using Windows-specific scripting idioms (e.g., Write-Host, Start-Sleep) without Linux equivalents; provide corresponding bash commands (e.g., echo, sleep).
- Consider reordering or parallelizing examples so that Linux-compatible approaches (bash, Python, cURL) are presented alongside Windows/PowerShell, not only after or instead of them.
Create pull request
Flagged Code Snippets
$request = "https://management.azure.com/subscriptions/${subsId}/resourceGroups/${resourceGroup}/providers/Microsoft.DataFactory/factories/${dataFactoryName}/pipelineruns/${runId}?api-version=${apiVersion}"
while ($True) {
$response = Invoke-RestMethod -Method GET -Uri $request -Header $authHeader
Write-Host "Pipeline run status: " $response.Status -foregroundcolor "Yellow"
if ( ($response.Status -eq "InProgress") -or ($response.Status -eq "Queued") ) {
Start-Sleep -Seconds 15
}
else {
$response | ConvertTo-Json
break
}
}
while ($True) {
$run = Get-AzDataFactoryV2PipelineRun -ResourceGroupName $resourceGroupName -DataFactoryName $DataFactoryName -PipelineRunId $runId
if ($run) {
if ( ($run.Status -ne "InProgress") -and ($run.Status -ne "Queued") ) {
Write-Output ("Pipeline run finished. The status is: " + $run.Status)
$run
break
}
Write-Output ("Pipeline is running...status: " + $run.Status)
}
Start-Sleep -Seconds 30
}
$request = "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DataFactory/factories/${factoryName}/pipelineruns/${runId}/queryActivityruns?api-version=${apiVersion}&startTime="+(Get-Date).ToString('yyyy-MM-dd')+"&endTime="+(Get-Date).AddDays(1).ToString('yyyy-MM-dd')+"&pipelineName=Adfv2QuickStartPipeline"
$response = Invoke-RestMethod -Method POST -Uri $request -Header $authHeader
$response | ConvertTo-Json
Write-Host "Activity run details:" -foregroundcolor "Yellow"
$result = Get-AzDataFactoryV2ActivityRun -DataFactoryName $dataFactoryName -ResourceGroupName $resourceGroupName -PipelineRunId $runId -RunStartedAfter (Get-Date).AddMinutes(-30) -RunStartedBefore (Get-Date).AddMinutes(30)
$result
Write-Host "Activity 'Output' section:" -foregroundcolor "Yellow"
$result.Output -join "`r`n"
Write-Host "\nActivity 'Error' section:" -foregroundcolor "Yellow"
$result.Error -join "`r`n"