Microsoft Designing and Implementing Microsoft DevOps Solutions (AZ-400) Free Practice Test
Question 1
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 use Azure Pipelines to build and test a React js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend enabling parallel jobs for the pipeline.
Does this meet the goal?
You use Azure Pipelines to build and test a React js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend enabling parallel jobs for the pipeline.
Does this meet the goal?
Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 2
Your company has a project in Azure DevOps.
You need to ensure that when there are multiple builds pending deployment only the most recent build is deployed.
What should you use?
You need to ensure that when there are multiple builds pending deployment only the most recent build is deployed.
What should you use?
Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 3
You use Azure Pipelines to manage project builds and deployments.
You plan to use Azure Pipelines for Microsoft Teams to notify the legal team when a new build is ready for release. You need to configure the Organization Settings in Azure DevOps to support Azure Pipelines for Microsoft Teams. What should you turn on?
You plan to use Azure Pipelines for Microsoft Teams to notify the legal team when a new build is ready for release. You need to configure the Organization Settings in Azure DevOps to support Azure Pipelines for Microsoft Teams. What should you turn on?
Correct Answer: C
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 4
Task 4
Youneed to configure a virtual machine template in a DevTest Labs environment named az400-38443478- dtl1. The operating system must be based on Windows Server 2016 Datacenter. Virtual machines created from the DevTest Lab must include the Selenium tool and theGoogle Chrome browser.
Youneed to configure a virtual machine template in a DevTest Labs environment named az400-38443478- dtl1. The operating system must be based on Windows Server 2016 Datacenter. Virtual machines created from the DevTest Lab must include the Selenium tool and theGoogle Chrome browser.
Correct Answer:
See the solution below in explanation.
Explanation:
To configure a virtual machine template in your DevTest Labs environment namedaz400-38443478-dtl1with Windows Server 2016 Datacenter that includes the Selenium tooland the Google Chrome browser, follow these steps:
Create a Custom Image with Windows Server 2016 Datacenter:
In the Azure Portal, go to your DevTest Labaz400-38443478-dtl1.
Navigate toConfiguration and policies > Custom images.
Use an existing VM or create a new one with Windows Server 2016 Datacenter.
After setting up the VM, capture it to create a custom image1.
Install Selenium and Google Chrome on the VM:
Connect to the VM via RDP.
Download and install the Selenium WebDriver for your preferred programming language from the official Selenium website2.
For Google Chrome, download the offline installer from the official website and install it on the VM3.
Generalize the VM:
Run thesysprepcommand to generalize the VM, which prepares it to be used as a template.
Shutdown the VM aftersysprepcompletes.
Capture the Generalized VM to Create a Template:
In the Azure Portal, navigate to the VM and selectCapture.
Provide the required details and create the image.
Add Selenium and Google Chrome Artifacts to the Template:
Go back to the DevTest Labaz400-38443478-dtl1.
SelectArtifactsand add Selenium and Google Chrome artifacts to the template.
Ensure these artifacts are configured to install during the VM creation process.
Create VMs from the Template:
Now, when youcreate a new VM in the DevTest Lab, select the custom image you created.
The VM will be provisioned with Windows Server 2016 Datacenter, and the Selenium tool and Google Chrome browser will be installed automatically.
By following these steps, you can ensure that all virtual machines created from this template in your DevTest Lab will have the required operating system, tools, and browser installed. Remember to replace placeholder names with the actual names of your resources where necessary.
Explanation:
To configure a virtual machine template in your DevTest Labs environment namedaz400-38443478-dtl1with Windows Server 2016 Datacenter that includes the Selenium tooland the Google Chrome browser, follow these steps:
Create a Custom Image with Windows Server 2016 Datacenter:
In the Azure Portal, go to your DevTest Labaz400-38443478-dtl1.
Navigate toConfiguration and policies > Custom images.
Use an existing VM or create a new one with Windows Server 2016 Datacenter.
After setting up the VM, capture it to create a custom image1.
Install Selenium and Google Chrome on the VM:
Connect to the VM via RDP.
Download and install the Selenium WebDriver for your preferred programming language from the official Selenium website2.
For Google Chrome, download the offline installer from the official website and install it on the VM3.
Generalize the VM:
Run thesysprepcommand to generalize the VM, which prepares it to be used as a template.
Shutdown the VM aftersysprepcompletes.
Capture the Generalized VM to Create a Template:
In the Azure Portal, navigate to the VM and selectCapture.
Provide the required details and create the image.
Add Selenium and Google Chrome Artifacts to the Template:
Go back to the DevTest Labaz400-38443478-dtl1.
SelectArtifactsand add Selenium and Google Chrome artifacts to the template.
Ensure these artifacts are configured to install during the VM creation process.
Create VMs from the Template:
Now, when youcreate a new VM in the DevTest Lab, select the custom image you created.
The VM will be provisioned with Windows Server 2016 Datacenter, and the Selenium tool and Google Chrome browser will be installed automatically.
By following these steps, you can ensure that all virtual machines created from this template in your DevTest Lab will have the required operating system, tools, and browser installed. Remember to replace placeholder names with the actual names of your resources where necessary.
Question 5
You have an Azure subscription.
You use Bicep templates to deploy websites and AzureSQL infrastructure.
You need to automate the deployments by using Azure Pipelines and a self-hosted agent that runs on two virtual machines. The solution must minimize administrative effort.
What should you do first?
You use Bicep templates to deploy websites and AzureSQL infrastructure.
You need to automate the deployments by using Azure Pipelines and a self-hosted agent that runs on two virtual machines. The solution must minimize administrative effort.
What should you do first?
Correct Answer: C
Question 6
Your company is concerned that when developers introduce open source Libraries, it creates licensing compliance issues.
You need to add an automated process to the build pipeline to detect when common open source libraries are added to the code base.
What should you use?
You need to add an automated process to the build pipeline to detect when common open source libraries are added to the code base.
What should you use?
Correct Answer: C
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 7
You have a GitHub repository named repo1 and an Azure key vault named kv1.
In repo1, you plan to create a workflow named Workflow 1 that will deploy adatabase server by using credentials stored in kv1.
You need to ensure that Workflow1 can retrieve the credentials from kv1.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answerarea and arrange them in the correct order.

In repo1, you plan to create a workflow named Workflow 1 that will deploy adatabase server by using credentials stored in kv1.
You need to ensure that Workflow1 can retrieve the credentials from kv1.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answerarea and arrange them in the correct order.

Correct Answer:

Explanation:
Create a service principal in Microsoft Entra ID.
# Needed for authentication between GitHub Actions and Azure.
Grant secret permissions to kv1.# Allows the service principal to read secrets from Key Vault.
Create a personal access token (PAT) in GitHub.# Required for GitHub to authenticate securely and use the service principal in the workflow.
Question 8
You have an Azure Kubernetes Service (AKS) pod.
You need to configure a probe to perform the following actions:
* Confirm that the pod is responding to service requests.
* Check the status of the pod four times a minute.
* Initiate a shutdown if the pod is unresponsive.
How should you complete the YAML configuration file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You need to configure a probe to perform the following actions:
* Confirm that the pod is responding to service requests.
* Check the status of the pod four times a minute.
* Initiate a shutdown if the pod is unresponsive.
How should you complete the YAML configuration file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:

Box 1: readiness Probe:
For containerized applications that serve traffic, you might want to verify that your container is ready to handle incoming requests. Azure Container Instances supports readiness probes to include configurations so that your container can ' t be accessed under certain conditions.
Reference:
https://docs.microsof t.com/en-us/azure/container-instances/container-instances-readiness-prob e
Question 9
You create a Git repository named Repo1 in Azure Repos.
You need to configure Repo1 to meet the following requirements:
* Work items must be linked to a pull request.
* Pull requests must have a minimum of two reviewers.
* Pull requests must complete a code review by using a thirty-party tool.
The solution must minimize administrative effort.
Which type of policy should you use for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each policy type 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.

You need to configure Repo1 to meet the following requirements:
* Work items must be linked to a pull request.
* Pull requests must have a minimum of two reviewers.
* Pull requests must complete a code review by using a thirty-party tool.
The solution must minimize administrative effort.
Which type of policy should you use for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each policy type 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.

Correct Answer:

Explanation:

Question 10
You need to find and isolate shared code. The shared code will be maintained in a series of packages.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Correct Answer:

Explanation:

Step 1: Create a dependency graph for the application
By linking work items and other objects, you can track related work, dependencies, and changes made over time. All links are defined with a specific link type. For example, you can use Parent/Child links to link work items to support a hierarchical tree structure. Whereas, the Commit and Branch link types support links between work items and commits and branches, respectively.
Step 2: Group the related components.
Packages enable you to share code across your organization: you can compose a large product, develop multiple products based on a common shared framework, or create and share reusable components and libraries.
Step 3: Assign ownership to each component graph
References:
https://docs.microso ft.com/en-us/azure/devops/boards/queries/link-work-items-support-traceabi lity?
view=azure-devops & tabs=new-web-form
https://docs.microsoft.com/en-us/visualstudio/releasenotes/tfs2017-relnotes
Question 11
You need to configure authentication for App1. The solution must support the planned changes.
Which three actions should you perform in sequence? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.

Which three actions should you perform in sequence? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.

Correct Answer:

Explanation:
Graphical user interface, text, application Description automatically generated

Woodgrove Bank plans to implement the following changes to the identity environment:
* Configure App1 to use a service principal.
Reference:
https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-po rtal