Skip to Content

AZ-400 Designing and Implementing Microsoft DevOps Solutions Exam Questions and Answers

The latest Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions exam and earn Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions certification.

AZ-400 Designing and Implementing Microsoft DevOps Solutions Exam Questions and Answers

Exam Question 31

You need to recommend a Docker container build strategy that meets the following requirements:

  • Minimizes image sizes
  • Minimizes the security surface area of the final image

What should you include in the recommendation?

A. multi-stage builds
B. PowerShell Desired State Configuration (DSC)
C. Docker Swarm
D. single-stage builds
Correct Answer:
A. multi-stage builds
Answer Description:
Multi-stage builds are a new feature requiring Docker 17.05 or higher on the daemon and client. Multistage builds are useful to anyone who has struggled to optimize Dockerfiles while keeping them easy to read and maintain.
Incorrect Answers: A swarm consists of multiple Docker hosts which run in swarm mode and act as managers (to manage membership and delegation) and workers (which run swarm services).
References:
Microsoft Docs > Use multi-stage builds

Exam Question 32

You plan to create an image that will contain a .NET Core application.
You have a Dockerfile file that contains the following code. (Line numbers are included for reference only.)
01 FROM microsoft/dotnet:2.1-sdk
02 COPY ./
03 RUN dotnet publish -c Release -o out
04 FROM microsoft/dotnet:2.1-sdk
05 COPY -fromF0 /out /
06 WORKDIR /
07 ENTRYPOINT [“dotnet”, “appl.dll”]
You need to ensure that the image is as small as possible when the image is built.
Which line should you modify in the file?

A. 1
B. 3
C. 4
D. 7
Correct Answer:
A. 1
Answer Description:
Multi-stage builds (in Docker 17.05 or higher) allow you to drastically reduce the size of your final image, without struggling to reduce the number of intermediate layers and files.
With multi-stage builds, you use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them begins a new stage of the builYou can selectively copy artifacts from one stage to another, leaving behind everything you don’t want in the final image.
References:
Microsoft Docs > Use multi-stage builds

Exam Question 33

You are developing an open source solution that uses a GitHub repository.
You create a new public project in Azure DevOps.
You plan to use Azure Pipelines for continuous builThe solution will use the GitHub Checks API.
Which authentication type should you use?

A. OAuth
B. GitHub App
C. a personal access token
D. SAML
Correct Answer:
B. GitHub App
Answer Description:
You can authenticate as a GitHub App.
References:
GitHub Docs > Authenticating with GitHub Apps

Exam Question 34

Your company has a project in Azure DevOps for a new web application.
You need to ensure that when code is checked in, a build runs automatically.
Solution: From the Continuous deployment trigger settings of the release pipeline, you enable the Pull request trigger setting.
Does this meet the goal?

A. Yes
B. No
Correct Answer:
B. No
Answer Description:
In Visual Designer you enable continuous integration (CI) by:

  1. Select the Triggers tab.
  2. Enable Continuous integration.

References:
Microsoft Docs > Create your first pipeline

Exam Question 35

Your company has a project in Azure DevOps for a new web application.
You need to ensure that when code is checked in, a build runs automatically.
Solution: From the Pre-deployment conditions settings of the release pipeline, you select After stage.
Does this meet the goal?

A. Yes
B. No
Correct Answer:
B. No
Answer Description:
Instead, In Visual Designer you enable continuous integration (CI) by:

  1. Select the Triggers tab.
  2. Enable Continuous integration.

References:
Microsoft Docs > Create your first pipeline

Exam Question 36

Your company has a project in Azure DevOps for a new web application.
You need to ensure that when code is checked in, a build runs automatically.
Solution: From the Pre-deployment conditions settings of the release pipeline, you select Batch changes while a build is in progress.
Does this meet the goal?

A. Yes
B. No
Correct Answer:
B. No
Answer Description:
Instead, In Visual Designer you enable continuous integration (CI) by:

  1. Select the Triggers tab.
  2. Enable Continuous integration.

References:
Microsoft Docs > Create your first pipeline

Exam Question 37

Your company has a project in Azure DevOps for a new web application.
You need to ensure that when code is checked in, a build runs automatically.
Solution: From the Triggers tab of the build pipeline, you select Enable continuous integration.
Does this meet the goal?

A. Yes
B. No
Correct Answer:
B. No
Answer Description:
In Visual Designer you enable continuous integration (CI) by:

  1. Select the Triggers tab.
  2. Enable Continuous integration.

A continuous integration trigger on a build pipeline indicates that the system should automatically queue a new build whenever a code change is committed.
References:
Microsoft Docs > Create your first pipeline

Exam Question 38

You have a project in Azure DevOps. You have an Azure Resource Group deployment project in Microsoft Visual Studio that is checked in to the Azure DevOps project.
You need to create a release pipeline that will deploy resources by using Azure Resource Manager templates. The solution must minimize administrative effort.
Which task type should you include in the solution?

A. Azure Cloud Service Deployment
B. Azure RM Web App Deployment
C. Azure PowerShell
D. Azure App Service Manage
Correct Answer:
C. Azure PowerShell
Answer Description:
There are two different ways to deploy templates to Azure DevOps Services. Both methods provide the same results, so choose the one that best fits your workflow.

  1. Add a single step to your build pipeline that runs the PowerShell script that’s included in the Azure Resource Group deployment project (Deploy-AzureResourceGroup.ps1). The script copies artifacts and then deploys the template.
  2. Add multiple Azure DevOps Services build steps, each one performing a stage task.

The first option has the advantage of using the same script used by developers in Visual Studio and providing consistency throughout the lifecycle.
References:
Microsoft Docs > Integrate ARM templates with Azure Pipelines

Exam Question 39

Your company is building a new solution in Java.
The company currently uses a SonarQube server to analyze the code of .NET solutions.
You need to analyze and monitor the code quality of the Java solution.
Which task types should you add to the build pipeline?

A. Chef
B. Gradle
C. Octopus
D. Gulp
Correct Answer:
B. Gradle
Answer Description:
SonarQube is a set of static analyzers that can be used to identify areas of improvement in your code. It allows you to analyze the technical debt in your project and keep track of it in the future. With Maven and Gradle build tasks, you can run SonarQube analysis with minimal setup in a new or existing Azure DevOps Services build task.
References:
Microsoft Docs > Use SonarQube with Azure DevOps or Team Foundation Server (TFS) for Java development

Exam Question 40

You have an Azure DevOps organization named Contoso and an Azure DevOps project named Project1.
You plan to use Microsoft-hosted agents to build container images that will host full Microsoft .NET Framework apps in a YAML pipeline in Project1.
What are two possible virtual machine images that you can use for the Microsoft-hosted agent pool? Each correct answer presents a complete solution.

A. vs2017-win2016
B. ubuntu-16.04
C. win1803
D. macOS-10.13
E. vs.2015-win2012r2
Correct Answer:
A. vs2017-win2016
B. ubuntu-16.04
Answer Description:
The Microsoft-hosted agent pool provides 7 virtual machine images to choose from:

  • Ubuntu 16.04 (ubuntu-16.04)
  • Windows Server 1803 (win1803) – for running Windows containers
  • Visual Studio 2019 Preview on Windows Server 2019 (windows-2019)
  • Visual Studio 2017 on Windows Server 2016 (vs2017-win2016)
  • Visual Studio 2015 on Windows Server 2012R2 (vs2015-win2012r2)
  • macOS X Mojave 10.14 (macOS-10.14)
  • macOS X High Sierra 10.13 (macOS-10.13)

References:
Microsoft Docs > Microsoft-hosted agents