ExamGecko
Home / Microsoft / AZ-400 / List of questions
Ask Question

Microsoft AZ-400 Practice Test - Questions Answers, Page 8

List of questions

Question 71

Report
Export
Collapse

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.

Your company uses Azure DevOps to manage the build and release processes for applications.

You use a Get repository for applications source control.

You need to implement a pull request strategy that reduces the history volume in the master branch.

Solution: You implement a pull request strategy that uses a three-way merge.

Does this meet the goal?

Yes
Yes
No
No
Suggested answer: B

Explanation:

Instead use fast-forward merge.

Note:

No fast-forward merge - This option merges the commit history of the source branch when the pull request closes and creates a merge commit in the target branch.

Reference:

https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies

asked 02/10/2024
Angel Castillo
32 questions

Question 72

Report
Export
Collapse

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?

multi-stage builds
multi-stage builds
PowerShell Desired State Configuration (DSC)
PowerShell Desired State Configuration (DSC)
Docker Swarm
Docker Swarm
single-stage builds
single-stage builds
Suggested answer: A

Explanation:

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:

C: 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).

Reference:

https://docs.docker.com/develop/develop-images/multistage-build/

asked 02/10/2024
John Doe
36 questions

Question 73

Report
Export
Collapse

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.)

Microsoft AZ-400 image Question 22 86936 10022024015257000000

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?

1
1
3
3
4
4
7
7
Suggested answer: C

Explanation:


asked 02/10/2024
Babatunde Ipaye
40 questions

Question 74

Report
Export
Collapse

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. 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 Batch changes while a build is in progress. Does this meet the goal?

Yes
Yes
No
No
Suggested answer: B

Explanation:

Instead, In Visual Designer you enable continuous integration (CI) by:

1. Select the Triggers tab.

2. Enable Continuous integration.

Note: Batch changes

Select this check box if you have many team members uploading changes often and you want to reduce the number of builds you are running. If you select this option, when a build is running, the system waits until the build is completed and then queues another build of all changes that have not yet been built.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-designer

asked 02/10/2024
Shauqi Naufaldy
30 questions

Question 75

Report
Export
Collapse

You have 50 Node.js-based projects that you scan by using WhiteSource. Each project includes Package.json, Package-lock.json, and Npm-shrinkwrap.json files. You need to minimize the number of libraries reports by WhiteSource to only the libraries that you explicitly reference. What should you do?

Configure the File System Agent plug-in.
Configure the File System Agent plug-in.
Add a devDependencies section to Package-lock.json.
Add a devDependencies section to Package-lock.json.
Configure the Artifactory plug-in.
Configure the Artifactory plug-in.
Delete Package-lock.json.
Delete Package-lock.json.
Suggested answer: B

Explanation:

Separate Your Dependencies

Within your package.json file be sure you split out your npm dependencies between devDependencies and (production) dependencies. The key part is that you must then make use of the --production flag when installing the npm packages. The --production flag will exclude all packages defined in the devDependencies section.

Reference: https://blogs.msdn.microsoft.com/visualstudioalmrangers/2017/06/08/manage-your-open-source-usage-and-security-as-reported-by-your-cicd-pipeline/

asked 02/10/2024
Wessel Beulink
39 questions

Question 76

Report
Export
Collapse

Your company deploys applications in Docker containers.

You want to detect known exploits in the Docker images used to provision the Docker containers.

You need to integrate image scanning into the application lifecycle. The solution must expose the exploits as early as possible during the application lifecycle. What should you configure?

a task executed in the continuous integration pipeline and a scheduled task that analyzes the image registry
a task executed in the continuous integration pipeline and a scheduled task that analyzes the image registry
manual tasks performed during the planning phase and the deployment phase
manual tasks performed during the planning phase and the deployment phase
a task executed in the continuous deployment pipeline and a scheduled task against a running production container
a task executed in the continuous deployment pipeline and a scheduled task against a running production container
a task executed in the continuous integration pipeline and a scheduled task that analyzes the production container
a task executed in the continuous integration pipeline and a scheduled task that analyzes the production container
Suggested answer: A

Explanation:

You can use the Docker task to sign into ACR and then use a subsequent script to pull an image and scan the container image for vulnerabilities. Use the docker task in a build or release pipeline. This task can be used with Docker or Azure Container registry.

Incorrect Answers:

C: We should not wait until deployment. We want to detect the exploits as early as possible.

D: We should wait until the image is in the product container. We want to detect the exploits as early as possible.

Reference: https://docs.microsoft.com/en-us/azure/devops/articles/security-validation-cicd-pipeline?view=vsts

asked 02/10/2024
Mohammed Hamid
46 questions

Question 77

Report
Export
Collapse

Your company has a hybrid cloud between Azure and Azure Stack.

The company uses Azure DevOps for its full CI/CD pipelines. Some applications are built by using Erlang and Hack. You need to ensure that Erlang and Hack are supported as part of the build strategy across the hybrid cloud. The solution must minimize management overhead. What should you use to execute the build pipeline?

a Microsoft-hosted agent
a Microsoft-hosted agent
Azure DevOps self-hosted agents on Azure DevTest Labs virtual machines.
Azure DevOps self-hosted agents on Azure DevTest Labs virtual machines.
Azure DevOps self-hosted agents on Hyper-V virtual machines
Azure DevOps self-hosted agents on Hyper-V virtual machines
Azure DevOps self-hosted agents on virtual machines that run on Azure Stack
Azure DevOps self-hosted agents on virtual machines that run on Azure Stack
Suggested answer: D

Explanation:

Azure Stack offers virtual machines (VMs) as one type of an on-demand, scalable computing resource. You can choose a VM when you need more control over the computing environment.

Reference: https://docs.microsoft.com/en-us/azure/azure-stack/user/azure-stack-compute-overview

asked 02/10/2024
Manoj Balan
44 questions

Question 78

Report
Export
Collapse

Your company has an Azure DevOps project,

The source code for the project is stored in an on-premises repository and uses on an on-premises build server. You plan to use Azure DevOps to control the build process on the build server by using a self-hosted agent. You need to implement the self-hosted agent.

You download and install the agent on the build server.

Which two actions should you perform next? Each correct answer presents part of the solution.

From Azure, create a shared access signature (SAS).
From Azure, create a shared access signature (SAS).
From the build server, create a certificate, and then upload the certificate to Azure Storage.
From the build server, create a certificate, and then upload the certificate to Azure Storage.
From the build server, create a certificate, and then upload the certificate to Azure Key Vault.
From the build server, create a certificate, and then upload the certificate to Azure Key Vault.
From DevOps, create a personal access token (PAT).
From DevOps, create a personal access token (PAT).
From the build server, run config.cmd.
From the build server, run config.cmd.
Suggested answer: B, E

Explanation:

B: Make sure you install your self-signed ssl server certificate into the OS certificate store.

E: When you have a self-signed SSL certificate for your on-premises TFS server, make sure to configure the Get we shipped to allow that self-signed SSL certificate. Enable Get to use SChannel during configure with 2.129.0 or higher version agent Pass --gituseschannel during agent configuration ./config.cmd --gituseschannel

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/certificate

asked 02/10/2024
JUAN LUIS BERMUDEZ MAYORAL
27 questions

Question 79

Report
Export
Collapse

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file.

D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

the tenant ID
the tenant ID
the subscription ID
the subscription ID
the client secret
the client secret
the app ID
the app ID
Suggested answer: A, B, D

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file.

D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

A. the tenant ID

B. the subscription ID

C. the client secret

D. the app ID

E. the object ID

Answer: ABD

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file. D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

asked 02/10/2024
Donna Brown
38 questions

Question 80

Report
Export
Collapse

You need to execute inline testing of an Azure DevOps pipeline that uses a Docker deployment model. The solution must prevent the results from being published to the pipeline. What should you use for the inline testing?

a single stage Dockerfile
a single stage Dockerfile
an Azure Kubernetes Service (AKS) pod
an Azure Kubernetes Service (AKS) pod
a multi-stage Dockerfile
a multi-stage Dockerfile
a Docker Compose file
a Docker Compose file
Suggested answer: D

Explanation:

Use Docker when running integration tests with Azure Pipelines.

Reference: https://crossprogramming.com/2019/12/27/use-docker-when-running-integration-tests-with-azure-pipelines.html

asked 02/10/2024
Mohit Mohit
45 questions
Total 489 questions
Go to page: of 49
Search

Related questions