Microsoft

AZ-400 Free Practice Questions — Page 25

Question 252

You have an Azure solution that contains a build pipeline in Azure Pipelines. You experience intermittent delays before the build pipeline starts. You need to reduce the time it takes to start the build pipeline. What should you do?

A. Enable self-hosted build agents.
B. Create a new agent pool.
C. Split the build pipeline into multiple stages.
D. Purchase an additional parallel job.
Show Answer
Correct Answer: A
Explanation:
Intermittent delays before a pipeline starts indicate queue time while waiting for an available agent. Using self-hosted build agents removes dependency on the shared Microsoft-hosted agent pool and typically provides immediate availability, reducing startup delays. Additional parallel jobs mainly affect how many jobs can run concurrently but do not eliminate agent queueing in the same way.

Question 253

You plan to use Terraform to deploy an Azure resource group from a Windows system. You need to install the required frameworks to support the planned deployment. Which two frameworks should you install? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Vault
B. Terratest
C. Node.js
D. Yeoman
E. Tiller
Show Answer
Correct Answer: B, D
Explanation:
On Windows, Terraform-based Azure deployments commonly use Terratest for testing Terraform modules (written in Go) and Yeoman to scaffold and generate Terraform project structures and templates. The other options are unrelated to basic Terraform deployment frameworks.

Question 254

HOTSPOT - You have an Azure virtual machine named VM1 that runs Linux. You plan to deploy the Desired State Configuration (DSC) extension to VM1. You need to grant the Log Analytics agent the appropriate directory permissions. How should you complete the command? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

Illustration for AZ-400 question 254
Show Answer
Correct Answer: rwx /tmp
Explanation:
The Log Analytics agent (omsagent) requires read, write, and execute permissions during DSC deployment on Linux. DSC temporarily uses the /tmp directory to download and verify modules, so granting rwx on /tmp ensures successful installation.

Question 255

You have a project in Azure DevOps. You plan to deploy a self-hosted agent by using an unattended configuration script. Which two values should you define in the configuration script? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. authorization credentials
B. the project name
C. the deployment group name
D. the organization URL
E. the agent pool name
Show Answer
Correct Answer: A, D
Explanation:
For unattended configuration of a self-hosted Azure DevOps agent, the script must include the organization URL so the agent knows where to register, and authorization credentials (commonly a PAT) so it can authenticate. Project name, deployment group name, and agent pool name are optional or can use defaults and are not strictly required.

Question 256

You have a project in Azure DevOps. You create the following YAML template named Template1.yml. steps: - script: npm install - script: yarn install - script: npm run compile You create the following pipeline named File1.yml. parameters: usersteps: - task: MyTask@1 - script: echo Done You need to ensure that Template1.yaml runs before File1.yml. How should you update File1.yml?

A. parameters: usersteps: extends: template: template1.yml - task: MyTask@1 - script: echo Done
B. template: template1.yml parameters: usersteps: - task: MyTask@1 - script: echo Done
C. extends: template: templatel.yml parameters: usersteps: - task: MyTask@1 - script: echo Done
D. parameters: usersteps: - template: templatel.yml - task: MyTask@1 - script: echo Done
Show Answer
Correct Answer: C
Explanation:
To guarantee that Template1.yml runs before any steps defined in File1.yml, the pipeline must extend from the template. The `extends` keyword makes the template the base pipeline, ensuring its steps execute first, and then allows File1.yml to pass parameters (such as additional steps) into that template. Option C uses the correct `extends: template:` syntax for this purpose. The filename typo is incidental to the intent of the question.

Question 258

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements: ✑ The build must access an on-premises dependency management system. ✑ The build outputs must be stored as Server artifacts in Azure DevOps. ✑ The source code must be stored in a Git repository in Azure DevOps. Solution: Configure the build pipeline to use a Microsoft-hosted agent pool running a Linux image. Include the Java Tool Installer task in the build pipeline. Does this meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
The solution does not meet the goal because Microsoft-hosted agents cannot reliably access on-premises dependency management systems. Accessing on-prem resources requires a self-hosted agent deployed within the on-premises network. While the other requirements (Azure DevOps Git and Server artifacts) are met, the on-prem dependency access requirement is not satisfied.

Question 259

You need to perform the GitHub code migration. The solution must support the planned changes for the DevOps environment. What should you use?

A. git clone
B. GitHub Importer
C. Import repository in Azure Repos
D. git-tfs
Show Answer
Correct Answer: B
Explanation:
The requirement is to migrate source code from TFS (TFVC) to GitHub to support future DevOps changes. GitHub Importer is the GitHub‑native tool designed for this scenario and explicitly supports importing repositories from Team Foundation Version Control into GitHub while preserving history. Options like git clone do not migrate TFVC, Import repository in Azure Repos targets Azure DevOps instead of GitHub, and git‑tfs is a lower‑level conversion tool rather than the recommended GitHub migration approach in exam scenarios.

Question 260

DRAG DROP - You need to replace the existing DevOps tools to support the planned changes. What should you use? To answer, drag the appropriate tools to the correct targets. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Select and Place:

Illustration for AZ-400 question 260
Show Answer
Correct Answer: Trello: Azure Boards Bamboo: Azure Pipelines Bitbucket: GitHub repositories
Explanation:
Trello is a work-item and board tool, which maps to Azure Boards. Bamboo provides CI/CD pipelines, replaced by Azure Pipelines. Bitbucket is a Git source control service, replaced by GitHub repositories.

Question 261

You need to configure Azure Pipelines to control App2 builds. Which authentication method should you use?

A. Windows NTLM
B. certificate
C. SAML
D. personal access token (PAT)
Show Answer
Correct Answer: D
Explanation:
Azure Pipelines commonly uses Personal Access Tokens (PATs) for authenticating users, services, or third‑party tools. PATs provide secure, scoped, revocable access to Azure DevOps services (including Pipelines) without relying on interactive logins or domain-based authentication. NTLM, certificates, and SAML are not used for pipeline control and automation in this scenario.

Question 262

You are using GitHub as a source code repository. You create a client-side Git hook on the commit-msg event. The hook requires that each commit message contain a custom work item tag. You need to make a commit that does not have a work item tag. Which git commit parameter should you use?

A. --squash
B. --no-verify
C. --message ''
D. --no-post-rewrite
Show Answer
Correct Answer: B
Explanation:
A client-side commit-msg hook can be bypassed when creating a commit by using the --no-verify option. This flag tells Git to skip running all pre-commit and commit-msg hooks, allowing the commit to proceed even if the message does not contain the required work item tag.

$19

Get all 531 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.