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:
⚠️
windows_first
⚠️
windows_tools
⚠️
powershell_heavy
⚠️
missing_linux_example
Summary:
The documentation demonstrates a Windows-first bias in several areas. Windows tools and patterns (e.g., cmd.exe, DPAPI, RDP) are mentioned before or instead of Linux equivalents. Code examples often default to Windows command lines (e.g., 'cmd /c echo hello'), and Windows-specific features are referenced without parallel Linux guidance. While there are some Linux-specific notes and a .NET example for Linux pool creation, Linux command-line examples and tools are generally missing or less emphasized.
Recommendations:
- Provide Linux shell command examples (e.g., 'bash -c "echo hello"') alongside or before Windows 'cmd.exe' examples in all code snippets.
- Mention Linux tools (e.g., OpenSSL, GPG) as alternatives to Windows DPAPI when discussing secrets management.
- Ensure that references to remote access (RDP/SSH) are balanced and that Linux SSH guidance is as prominent as Windows RDP guidance.
- Include explicit Linux-focused code snippets for running tasks, especially in sections where only Windows commands are shown.
- Where possible, use cross-platform neutral language and examples (e.g., 'echo hello' without specifying shell) or provide both Windows and Linux variants.
- Highlight any Linux-specific considerations or differences in user account handling, not just in passing but with concrete examples.
Create pull request
Flagged Code Snippets
task.UserIdentity = new UserIdentity(new AutoUserSpecification(elevationLevel: ElevationLevel.Admin, scope: AutoUserScope.Task));
taskToAdd.withId(taskId)
.withUserIdentity(new UserIdentity()
.withAutoUser(new AutoUserSpecification()
.withElevationLevel(ElevationLevel.ADMIN))
.withScope(AutoUserScope.TASK));
.withCommandLine("cmd /c echo hello");
user = batchmodels.UserIdentity(
auto_user=batchmodels.AutoUserSpecification(
elevation_level=batchmodels.ElevationLevel.admin,
scope=batchmodels.AutoUserScope.task))
task = batchmodels.TaskAddParameter(
id='task_1',
command_line='cmd /c "echo hello world"',
user_identity=user)
batch_client.task.add(job_id=jobid, task=task)
CloudPool pool = null;
Console.WriteLine("Creating pool [{0}]...", poolId);
// Create a pool using Virtual Machine Configuration.
pool = batchClient.PoolOperations.CreatePool(
poolId: poolId,
targetDedicatedComputeNodes: 2,
virtualMachineSize: "standard_d2s_v3",
VirtualMachineConfiguration: new VirtualMachineConfiguration(
imageReference: new ImageReference(
publisher: "MicrosoftWindowsServer",
offer: "WindowsServer",
sku: "2022-datacenter-core",
version: "latest"),
nodeAgentSkuId: "batch.node.windows amd64");
// Add named user accounts.
pool.UserAccounts = new List<UserAccount>
{
new UserAccount("adminUser", "A1bC2d", ElevationLevel.Admin),
new UserAccount("nonAdminUser", "A1bC2d", ElevationLevel.NonAdmin),
};
// Commit the pool.
await pool.CommitAsync();
CloudTask task = new CloudTask("1", "cmd.exe /c echo 1");
task.UserIdentity = new UserIdentity(AdminUserAccountName);