Docsity

AZ-401 Practice Tests - Microsoft Agentic DevOps Engineer Expert, Exams of Education & Teaching

Partial preview of the text

Download AZ-401 Practice Tests - Microsoft Agentic DevOps Engineer Expert and more Exams Education & Teaching in PDF only on Docsity!

MICROSOFT

Question 1

You coordinate work in an Azure DevOps Services project that uses the Basic process. The project has Area Paths named Checkout and Reliability and Iteration Paths named Sprint 7 and Sprint 8. You can edit both path fields on the Issues and select the existing paths. The current reports group Issues 214 and 219 under Checkout for team responsibility and Sprint 7 for scheduling. Issue 214 stays with Checkout but moves to Sprint 8. Reliability takes responsibility for Issue 219 and will work on it in Sprint 7. The existing reports use the two path fields and must show these changes for the same Issues. Which edits should you make? Choose ONE. A. Add a Sprint 8 tag to Issue 214. Set Issue 219's Area Path to Reliability. B. Set Issue 214's Iteration Path to Sprint 8. Set Issue 219's Area Path to Reliability. C. Set both Issues' Iteration Paths to Sprint 8. Set Issue 219's Area Path to Reliability. D. Set Issue 214's Iteration Path to Sprint 8. Assign Issue 219 to an engineer on the Reliability team. Answer: B

Explanation B - Correct: In this Azure DevOps Services project using the Basic process, Area Path represents the team responsible for an Issue and Iteration Path records its scheduled sprint. You can select the existing paths and edit both fields. Set Issue 214's Iteration Path to Sprint 8 and keep its Area Path at Checkout. Set Issue 219's Area Path to Reliability and keep its Iteration Path at Sprint 7. The two edits update the existing reports using the same Issues.

MICROSOFT

Question 2

On November 14, 2026, a release engineer uses an AI-assisted integration to update an Azure Boards work item in Azure DevOps Services. The integration has permission to read and edit the item. An update replaces the entire Acceptance Criteria field. The integration can make the update conditional on the work-item revision returned by a read. At revision 18, the field contained one criterion: "Retain deployment logs for 7 days." The integration prepared an update that kept that criterion and added "Link the smoke-test results to the work item." Before the update ran, another engineer changed the retention period to 30 days in revision 19. The update conditioned on revision 18 was rejected with a revision mismatch. The release engineer needs to add the smoke-test criterion while preserving other contributors' edits, including any made while the retry is being prepared. Which recovery sequence should the integration use? Choose ONE. A. Read the current field and revision, append the full original proposal to the current text, and write the combined text conditional on that revision. Reread the field after the write. B. Read the current field, add the smoke-test criterion if it is missing, and write the merged text without a revision condition. Reread the field after the write. C. Read the current field and revision, add the smoke-test criterion to the text if it is missing, and use that revision to guard any write. Reread the field after a successful write. D. Read the latest revision, submit the original replacement text conditional on that revision, and reread the

MICROSOFT

Question 4

A DevOps metrics analyst is preparing the October 2026 report for a production pipeline. The report covers scheduled runs queued from 00:00 UTC on October 1 through, but excluding, 00:00 UTC on November 1. All runs in the window have a final outcome: 118 succeeded, 10 failed, and 12 were canceled. The team defines two success-rate targets:

  • Execution reliability must be at least 92.0% among runs that were not canceled.
  • Scheduled-run yield must be at least 85.0% across all scheduled runs in the report, including canceled runs. Use the unrounded rates to evaluate the targets, and round the displayed percentages to one decimal place. Which results should the analyst report? Choose ONE. A. Execution reliability meets its target. Scheduled-run yield meets its target. B. Execution reliability misses its target. Scheduled-run yield meets its target. C. Execution reliability meets its target. Scheduled-run yield misses its target. D. Execution reliability misses its target. Scheduled-run yield misses its target. Answer: C

Explanation C - Correct: For runs queued in the October UTC reporting window, both measures count 118 successes. Execution reliability excludes the 12 canceled runs, giving 118 ÷ (118 + 10) = 92.1875%. It meets the 92.0% target and displays as 92.2%. Scheduled-run yield includes the canceled runs, giving 118 ÷ (118 + 10 + 12) ≈ 84.2857%. It misses the 85.0% target and displays as 84.3%. Compare each unrounded rate with its target before rounding for display.

MICROSOFT

Question 5

On November 14, 2026, a team uses version 1.4 of its VS Code agent profile to run pre-release validation for an approved commit. The agent can submit a validation job through an MCP tool. The profile disables the service's preview status tool, and the agent credential lacks permission to read job status. The release operator can look up submissions by correlation ID in the service console. The team approves four action requests for the entire run. Each new session displays a fresh local counter, but the run allowance applies across sessions. The runner can save a checkpoint when it exits without spending another request. The validation service uses the client correlation ID for tracing and can create a separate job if the same ID is submitted again. Run log: Repository and commit checks completed. Results saved. Action requests used: 4 of 4. Final request: validation submitted with client correlation ID VAL-204. Client result: timed out waiting for a response. No server job ID or terminal result received. What should the run controller do next? Choose ONE. A. Keep the completed checks, open a new session, and resubmit the validation with the original correlation ID to recover the missing result. B. Record the remote validation as unresolved, save the completed checks and correlation ID, and end the loop so the release operator can reconcile the submission.

Question 5 continued C. Keep the validation unresolved, save the completed checks and correlation ID, and open a new session to query the preview status tool. D. Record the remote validation as failed, save the completed checks and correlation ID, and end the loop so the validation can be rerun later. Answer: B

Explanation B - Correct: The client timeout leaves the acceptance and outcome of VAL-204 unresolved. The four-request allowance has been exhausted across sessions, and resubmitting with the tracing ID can create another job. In the team's version 1.4 VS Code profile used on November 14, 2026, the preview status tool is disabled and the agent credential lacks status-read permission. Save the completed checks and VAL-204 through the exit checkpoint, which costs no action request, and stop the loop. The release operator can use the correlation ID to reconcile the original submission in the service console.

MICROSOFT

Question 6

On November 14, 2026, a DevOps team is testing a release-triage workflow in an internal preview. Its pinned GitHub Copilot build in VS Code has Agent mode and repository skill discovery enabled for the pilot workspace. A direct call to the Azure DevOps MCP work-item read tool succeeds with credentials scoped to the target project. Workspace policy blocks shell execution and work-item writes. The draft skill is saved as .github/skills/release-triage/README.md and does not appear in the workspace's skill list. Its frontmatter is: Code (yaml)

name: release-triage summary: Verify an Azure DevOps work item and report its status.

The skill must retrieve the supplied work-item ID, confirm that the returned ID matches, and report the item's status. The repository also contains scripts/collect.ps1, a read-only script that performs the lookup when run from a shell. Which configuration makes the skill discoverable and lets the agent complete the workflow under the current policy? Choose ONE. A. Save the file as .github/skills/release-triage/SKILL.md, retain summary in the frontmatter, and direct the agent to call the MCP work-item read tool. B. Keep the file at .github/skills/release-triage/README.md, rename summary to description, and direct the agent to call the MCP work-item read tool. C. Save the file as .github/skills/release-triage/SKILL.md, rename summary to description, and direct the agent to run scripts/collect.ps1. D. Save the file as .github/skills/release-triage/SKILL.md, rename summary to description, and direct the agent to call the MCP work-item read tool. Answer: D

Explanation D - Correct: In the team's November 14, 2026 pilot, the pinned GitHub Copilot build in VS Code has Agent mode and

MICROSOFT

Question 8

On November 14, 2026, you administer an Azure Repos Git repository in Azure DevOps Services. The release/production branch has a required build validation policy. The Release Responders group has Contribute and Contribute to pull requests set to Allow. It also inherits Allow for Bypass policies when pushing from the repository. No other assignment grants either bypass permission, and no assignment denies pull request completion bypass. You have Manage permissions on the branch. In a test of the current configuration, a group member successfully pushes a fast-forward commit directly to release/production. The same member then tries to complete a separate, conflict-free pull request targeting that branch. Its required build has failed, and the member cannot complete the pull request. The team needs members of Release Responders to be able to complete an emergency pull request when the required build fails. Direct pushes by those members to release/production must be blocked, and the group's permissions on other branches must stay as they are. Which settings should you apply to the group in Branch security for release/production? Leave any permission that an option does not list as it is. Choose ONE. A. Set Bypass policies when completing pull requests to Allow and Force push to Deny. B. Set Bypass policies when completing pull requests to Allow and Bypass policies when pushing to Not set. C. Set Bypass policies when completing pull requests to Not set and Bypass policies when pushing to Deny. D. Set Bypass policies when completing pull requests to Allow and Bypass policies when pushing to Deny. Answer: D

Explanation D - Correct: In Azure Repos Git on Azure DevOps Services, the two bypass permissions apply to different operations. On release/production, Allow for Bypass policies when completing pull requests lets group members with the existing contribution permissions explicitly override the failed build when completing a pull request. Deny for Bypass policies when pushing overrides the repository-level Allow on that branch, so the required policy blocks a direct push even when it is a fast-forward. Both assignments are scoped to release/production, so permissions on other branches are unaffected. Microsoft Learn: Set branch permissions · Microsoft Learn: Understand permission states

MICROSOFT

Question 9

On November 14, 2026, you are coordinating two fixes in a GitHub.com organization repository with Copilot cloud agent enabled under GitHub Copilot Business. Morgan and Riley both have repository write access. Classic branch protection on main requires one approving review and a passing ci check. Auto-merge is disabled. Morgan posts an @copilot comment on an open pull request assigned to Copilot, asking it to make the follow-up fix in that same pull request. The pull request head is fix/retry-handler, and its timeline shows that the comment started a new agent session. Morgan also assigns a separate issue to Copilot. The agent opens a pull request attributed to Morgan. Morgan marks it ready for review and authorizes the GitHub Actions run. The required ci check passes on the latest commit, but no one has submitted an approving review. Both pull requests target main. Which plan correctly identifies where the cloud agent can push for each fix and how to merge the issue pull request? Choose ONE. A. Copilot pushes the follow-up to fix/retry-handler and the issue fix to a new Copilot branch. Riley approves the issue pull request and asks Copilot to merge it.

Question 9 continued B. Copilot pushes the follow-up to fix/retry-handler and the issue fix to a new Copilot branch. Riley approves the issue pull request and merges it. C. Copilot pushes each fix to its own new Copilot branch. Riley approves the issue pull request and asks Copilot to merge it. D. Copilot pushes each fix to its own new Copilot branch. Riley approves the issue pull request and merges it. Answer: B

Explanation B - Correct: For GitHub Copilot Business on GitHub.com as of November 14, 2026, the default push target for an @copilot request to update an existing pull request is that pull request's head. Morgan requested the update in the same pull request, so Copilot pushes to fix/retry-handler. The separate issue assignment creates a new copilot/ branch. Morgan's workflow authorization allowed GitHub Actions to run, and ci passed on the latest commit. The approving review is a separate requirement. Classic branch protection adds an approval when Copilot opens a pull request under its own app identity. This pull request is attributed to Morgan, so one eligible approval is sufficient. Morgan requested the pull request and cannot supply that approval. Riley has write access and can provide the required approval, then merge manually with the passing check. Copilot cloud agent can push the proposed changes to its assigned branch but cannot approve or merge the pull request.

MICROSOFT

Question 10

On November 14, 2026, a team is troubleshooting a required CI check for pull requests into main on GitHub.com. Contributors can push topic branches but cannot bypass the merge requirement. The team can edit the CI job. The developer and the Linux CI runner both use Git 2.48.1, with trailing spaces configured as whitespace errors. A developer stages a one-line addition with trailing spaces. The local pre-commit hook runs git diff --cached --check and rejects the commit. Without changing the index, the developer runs git commit --no-verify and pushes the resulting commit. The required CI job checks out that exact commit with a clean working tree and index. Its sole parent is available. The job runs the same command as the hook and reports success. The job is configured to fail when its check exits nonzero. Which change to the CI check catches the whitespace error while keeping the existing hook for local feedback? Choose ONE. A. Check the patch from the commit's parent to the checked-out commit. Code (bash) git diff --check HEAD^ HEAD B. Compare the working tree with the checked-out commit. Code (bash) git diff --check HEAD C. Check the patch from the checked-out commit back to its parent. Code (bash) git diff --check HEAD HEAD^ D. Invoke the existing pre-commit script directly from the CI checkout. Answer: A

Explanation

MICROSOFT

Question 12

On November 14, 2026, a team runs a release pipeline in Azure DevOps Services on a Microsoft-hosted agent. The installed Azure Load Testing extension provides the AzureLoadTest@1 task. Its service connection uses an identity with Load Test Contributor on the test resource. The task sets waitForCompletion: false so the pipeline can prepare release artifacts while a 20-minute load test runs against staging. The release gate can read the status and results for the exact load-test run ID. In a rehearsal, the launch task reported success while that run was still active. Production deployment requires the current release attempt to complete its configured workload and meet its error-rate and latency criteria. Which rule should open the production gate? Choose ONE. A. When the matching run completes successfully, open the gate if its final evaluation shows that both criteria passed. B. After the planned test duration elapses, open the gate if the matching run's latest measurements are within both limits. C. When the matching run reaches a terminal state, open the gate if its results report can be archived. D. When the launch task succeeds, open the gate if the latest completed run against the same staging deployment met both criteria. Answer: A

Explanation A - Correct: In this November 14, 2026 Azure DevOps Services setup, the installed extension's AzureLoadTest@1 task uses waitForCompletion: false, so task success confirms that the load test was launched. While the Microsoft-hosted pipeline prepares release artifacts, the load test can continue against staging. At the production gate, use the existing authorized result access to check the exact run ID for the current release attempt. Open the gate only after that run completes its workload successfully and its final evaluation shows that both the configured error-rate and latency criteria passed. Keep the gate closed while the matching result is pending or unavailable, or if the run fails or stops before completion.

MICROSOFT

Question 13

For a November 14, 2026 release, an Azure DevOps Services YAML pipeline uses the installed AzureLoadTest@1 task with waitForCompletion set to true. The task runs a 10-minute JMeter test against a staging checkout API using a v0.1 load test configuration. The pipeline is authorized to use the Azure service connection, whose identity has Load Test Contributor on the load testing resource. Deployment requires the load test task to succeed. The current configuration uses a 90% auto-stop threshold over 60 seconds and has no failure criteria. The first run finished with 6% errors overall. The Checkout sampler had 1% errors, and the highest error rate in any 60-second window was 12%. The pipeline allowed deployment. A second run stopped early after a 60-second window with 96% errors. If those traffic patterns recur, the team wants the first run to finish and block deployment and the second to stop early under the existing outage cutoff. A completed run must fail the quality check when more than 2% of all requests fail. Which excerpt should you use in the load test configuration? Choose ONE. A. ```yaml autoStop: errorPercentage: 90

Question 13 continued timeWindow: 60 failureCriteria:

  • percentage(error) > 0. B. ```yaml autoStop: errorPercentage: 90 timeWindow: 60 failureCriteria:
  • Checkout: percentage(error) > 2 C. ```yaml autoStop: errorPercentage: 90 timeWindow: 60 failureCriteria:
  • percentage(error) > 2 D. ```yaml autoStop: errorPercentage: 2 timeWindow: 60 failureCriteria:
  • percentage(error) > 2

Answer: C

Explanation C - Correct: In this November 14, 2026 Azure DevOps Services pipeline, the v0.1 YAML keeps auto-stop at 90% over 60 seconds. The first run's highest window was 12%, so the run can finish. The outage window reached 96%, so auto-stop would still end that run early to limit cost. The failure criterion has no sampler prefix, so it evaluates the aggregate across all requests. Its threshold is 2 on the 0-100 percentage scale, and the strict comparison allows exactly 2%. The completed run's 6% overall error rate therefore fails the criterion even though Checkout recorded 1%. The pipeline is authorized to use the service connection, whose identity has Load Test Contributor on the load testing resource. With waitForCompletion set to true, AzureLoadTest@1 waits for the result and requires the criteria to pass for the task to succeed. The failed criterion blocks deployment.

Question 15 continued B. feature/cache and release/2026. C. main and hotfix/token D. feature/cache and hotfix/token Answer: A

Explanation A - Correct: In this Azure DevOps Services setup, the authorized GitHub App connects the repository to the YAML pipeline. For GitHub PR validation, pr.branches.include matches the pull request's target branch when the PR opens or receives new commits. The cache PR targets main and the token fix targets release/2026.11, so both qualify. The promotion PRs target staging, which is absent from the list. The matching rule applies with push CI disabled.

MICROSOFT

Question 16

An Azure DevOps Services pipeline validates pull requests from public forks of a GitHub.com repository. Fork jobs receive a restricted job token and no protected pipeline secrets. A fork job replaced a test launcher in the self-hosted Linux agent's home directory. The next job on that VM started with a clean checkout and still executed the replacement launcher. Keep automatic fork validation and the existing credential policy. Every validation job, including a rerun for the same pull request, must start from a trusted host state. The team manages VM provisioning outside the jobs, and the jobs use no shared writable storage. Which plan meets these requirements? Choose ONE. A. Provision a VM from a trusted image for each validation job and discard it when the job ends. B. Issue a fresh restricted token and restore the checkout and test launcher before reusing the VM. C. Reserve a reusable agent pool for fork jobs and restart each agent service before its next job. D. Provision a VM from a trusted image for each pull request and keep it until that pull request closes. Answer: A

Explanation A - Correct: Keep the existing restrictions on tokens and secrets for GitHub fork jobs in Azure DevOps Services. Those controls limit credential exposure, while the incident shows that fork code can still alter files on the self-hosted Linux VM outside the checkout. Provision each job on a VM from a trusted image and discard that VM afterward. With no shared writable storage, the next job starts without the prior job's modified files, even when it is a rerun of the same pull request.

MICROSOFT

Question 17

On November 14, 2026, you review a GitHub Copilot draft for an Azure Pipelines release validation step. Your permissions cover the expanded YAML preview and inspection of the supplied fixture. On the self-hosted Linux pool, the script runs from the root of a clean checkout under Bash 5.2 with errexit and pipefail initially disabled. Both installed versions of release-check inspect the current worktree and return 0 on success or a nonzero code on failure. The installations shown in the fixture are fixed for this review. The Copilot draft contains this step. Code (yaml) pool: name: ReleaseLinux steps:

  • script: | release-check --version release-check | tee validation.log env: APPROVED_REVISION: '31a7f2c0d9e4b6a18c5f0237de9b4a621f8073cd' The simulated fixture shows these observations. Code (text) Expanded YAML preview: succeeded git rev-parse --verify HEAD: 9c45e2b1630fac8d71be43a5e6802d9f17ca564b git cat-file -e "${APPROVED_REVISION}^{commit}": exit 0 command -v release-check: /usr/local/bin/release-check release-check --version: 2.3. /opt/release-check/2.4.1/bin/release-check --version: 2.4. release-check: exit 7 tee validation.log: exit 0 Script step: succeeded The step must confirm that the checked-out commit matches APPROVED_REVISION before running release-check 2.4.1. It must save the checker's standard output in validation.log and fail if either the checker or the log write fails. Which replacement for the script body meets these requirements? Choose ONE. A. bash checker=/opt/release-check/2.4.1/bin/release-check test "$(git rev-parse --verify HEAD)" = "$APPROVED_REVISION" || exit 1 set -o pipefail "$checker" | tee validation.log B.bash checker="$(command -v release-check)"

Question 18 continued run. You can edit the YAML on both branches. Which change makes pushes to main queue CI runs, keeps pushes to develop from queueing CI runs, and preserves manual builds on both branches? Choose ONE. A. Add this block at the top level of azure-pipelines.yml and keep the build template as shown. Code (yaml) trigger: branches: include:

  • main B. Add this condition to the script step in steps/build.yml and keep the root YAML as shown. Code (yaml) condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') C. Add this block at the top level of steps/build.yml and keep the root YAML as shown. Code (yaml) trigger: branches: include:
  • main D. Add these blocks at the top level of azure-pipelines.yml and keep the build template as shown. Code (yaml) variables: ciBranch: main trigger: branches: include:
  • $(ciBranch)

Answer: A

Explanation A - Correct: In Azure DevOps Services as of November 14, 2026, Disable implied YAML CI trigger suppresses implicit push CI when the root YAML omits trigger. It still permits explicit CI triggers. This root-level trigger gives Azure Pipelines the literal branch name main before a run is queued. The main push matches, the develop push falls outside the include list, and manual runs on either branch still execute the unchanged build template.

MICROSOFT

Question 19

A release engineer is testing a YAML pipeline in Azure DevOps Services using the service behavior as of November 14, 2026. The repository contains scan-result.txt, a one-line test fixture containing either pass or fail. Code (yaml) trigger: none pool: vmImage: ubuntu-latest stages:

  • stage: Build dependsOn: [] jobs:
  • job: Compile steps:
  • script: echo Build completed
  • stage: Security dependsOn: [] jobs:
  • job: Scan steps:
  • checkout: self
  • script: | test "$(cat scan-result.txt)" = pass
  • stage: Deploy dependsOn: [Build, Security] condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') jobs:
  • job: Release steps:
  • script: echo Release gate reached In a manually queued run, Build.SourceBranch was refs/heads/main and scan-result.txt contained fail. Build succeeded, Security failed with exit code 1, and the Release job logged Release gate reached. The pipeline can be queued from other branches. All other source refs available for queuing differ from refs/heads/main by more than capitalization. Deploy must run only when both predecessor stages succeed and the run is from refs/heads/main. Which replacement for the Deploy condition meets both requirements? Choose ONE. A. ```yaml

Question 20 continued the same repository, tag, and template path. Azure Pipelines evaluates that relationship before the stage that consumes prod-arm starts. An application pipeline that only includes the release stages can still build, but its deployment stage fails the template check.

MICROSOFT

Question 21

A team uses GitHub Agentic Workflows on GitHub.com to triage pull requests from public forks. The generated workflow runs on a GitHub-hosted Linux runner and uses pull_request_target. In a test run, a custom job checks out the fork's head branch and runs ./scripts/classify.sh from that checkout. The classifier step receives a token with contents: write on the base repository. The classifier needs only the list of changed paths, which the workflow already retrieves separately. A separate safe-output job posts the triage comment. Which change prevents the fork contributor from running code with the write token while preserving classification and commenting? Choose ONE. A. Run the classifier from the maintainer-controlled base revision and pass the changed-path list as data. B. Move classifier result handling to the safe-output job and keep execution in the fork checkout. C. Use a read-only token for checkout and retain the write token for the classifier step. D. Pin the fork checkout to the pull request's exact head commit before running the classifier. Answer: A

Explanation A - Correct: In this GitHub.com pull_request_target workflow, the custom classifier step explicitly receives a token with contents: write on the base repository. Running the classifier and its executable dependencies from the maintainer-controlled base revision prevents a fork contributor from replacing the code that runs with that token. The classifier still receives the changed-path list as input data, and the separate safe-output job can still post the triage comment.

MICROSOFT

Question 22

An Azure DevOps Services YAML pipeline must deploy the exact archive that passed integration tests in the current run. The Package stage publishes two pipeline artifacts and emits testedArtifact as a stage output containing the published name of the tested archive. It also emits packagePath, the local path from which that archive was published. The tested artifact name can vary between runs. Deploy depends on successful completion of Package and runs on a separate Microsoft-hosted Linux agent with its own workspace. The deployment job can read artifacts from both runs shown and has permission to deploy to the target. Code (text) Current run 6812, commit 72fc0e Package result = Succeeded Published artifact names = checkout-linux-a, checkout-linux-b Template default artifact name = checkout-linux-a testedArtifact = checkout-linux-b packagePath = /tmp/checkout.tar.gz Latest completed successful run 6811, commit 72fc0e

Question 22 continued Published artifact names = checkout-linux-a, checkout-linux-b Each archive embeds its producer run ID, so the two runs produce different archives from the same commit. How should you configure Deploy to retrieve the tested archive? Choose ONE. A. Map testedArtifact into Deploy and download that artifact from the latest completed successful run of this pipeline. B. Map packagePath into Deploy and read the archive at that path on the deployment agent. C. Map testedArtifact into Deploy and download that artifact from the current pipeline run. D. Use the template's default artifact name in Deploy and download that artifact from the current pipeline run. Answer: C

Explanation C - Correct: Map the testedArtifact output from the successful Package stage through the existing dependency, then download that named pipeline artifact from the current Azure DevOps Services run. Here the name is checkout-linux-b and the run is 6812. Together they identify the archive that passed integration tests. The deployment job has permission to read and deploy it, and downloading the published artifact transfers it to the separate agent.

MICROSOFT

Question 23

On November 14, 2026, a release pipeline uses a fresh Ubuntu 22.04 worker with stable PowerShell 7.4 to validate an Azure machine configuration Audit package before publication. The pipeline needs per-resource compliance results for that worker. The build account creates the ZIP successfully, but its first run of Get-GuestConfigurationPackageComplianceStatus stops with a filesystem permission error before returning any resource results. No test agent is present under /var/lib/GuestConfig/bin. The Linux test agent documented for this setup lists PowerShell 7.2.0-preview.7. Both the build account and a sudo session can load the Guest Configuration module and read the ZIP. Which plan should the pipeline use on the next fresh worker to obtain the local compliance results while keeping elevation limited to the step that requires it? Choose ONE. A. Create the ZIP with sudo pwsh, then run the compliance check with sudo pwsh. B. Create the ZIP with sudo pwsh, then run the compliance check as the build account. C. Create the ZIP as the build account, then run the compliance check with sudo pwsh. D. Create the ZIP as the build account, then run the compliance check as that account in PowerShell 7.2.0-preview.7. Answer: C

Explanation C - Correct: Keep New-GuestConfigurationPackage under the build account and run Get-GuestConfigurationPackageComplianceStatus through sudo pwsh. On the fresh Ubuntu 22.04 worker, the first compliance check needs root access to install the agent under /var/lib/GuestConfig/bin. The stable PowerShell 7.4 shell can launch the check. In the documented Linux setup, the agent carries PowerShell 7.2.0-preview.7 as its own runtime. The Audit check uses DSC Test and Get to report compliance and per-resource details for that worker without applying the configuration. Microsoft Learn package testing guide