ExamGecko
Home Home / Microsoft / AZ-400

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

Question list
Search
Search

List of questions

Search

Related questions











You are automating the build process for a Java-based application by using Azure DevOps.

You need to add code coverage testing and publish the outcomes to the pipeline.

What should you use?

A.
Cobertura
A.
Cobertura
Answers
B.
Bullseye Coverage
B.
Bullseye Coverage
Answers
C.
MSTest
C.
MSTest
Answers
D.
Coverlet
D.
Coverlet
Answers
E.
NUnit
E.
NUnit
Answers
F.
Coverage.py
F.
Coverage.py
Answers
Suggested answer: A

Explanation:

Use Publish Code Coverage Results task in a build pipeline to publish code coverage results to Azure Pipelines or TFS, which were produced by a build in Cobertura or JaCoCo format.

Incorrect Answers:

B: Bullseye Coverage is used for C++ code, and not for Java.

D: If you're building on Linux or macOS, you can use Coverlet or a similar tool to collect code coverage metrics. Code coverage results can be published to the server by using the Publish Code Coverage Results task. To leverage this functionality, the coverage tool must be configured to generate results in Cobertura or JaCoCo coverage format.

F: Coverage.py is used for Python, not for Java.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results

You have an existing build pipeline in Azure Pipelines.

You need to use incremental builds without purging the environment between pipeline executions.

What should you use?

A.
a self-hosted agent
A.
a self-hosted agent
Answers
B.
Microsoft-hosted parallel jobs
B.
Microsoft-hosted parallel jobs
Answers
C.
a File Transform task
C.
a File Transform task
Answers
Suggested answer: A

Explanation:

When you run a pipeline on a self-hosted agent, by default, none of the subdirectories are cleaned in between two consecutive runs. As a result, you can do incremental builds and deployments, provided that tasks are implemented to make use of that. You can override this behavior using the workspace setting on the job.

Incorrect Answers:

B: The workspace clean options are applicable only for self-hosted agents. When using Microsoft-hosted agents job are always run on a new agent.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases

You have a private project in Azure DevOps.

You need to ensure that a project manager can create custom work item queries to report on the project's progress. The solution must use the principle of least privilege. To which security group should you add the project manager?

A.
Reader
A.
Reader
Answers
B.
Project Collection Administrators
B.
Project Collection Administrators
Answers
C.
Project Administrators
C.
Project Administrators
Answers
D.
Contributor
D.
Contributor
Answers
Suggested answer: D

Explanation:

Contributors have permissions to contribute fully to the project code base and work item tracking. The main permissions they don't have or those that manage or administer resources.

Reference:

https://docs.microsoft.com/en-us/azure/devops/organizations/security/permissions

Your company has a project in Azure DevOps for a new application. The application will be deployed to several Azure virtual machines that run Windows Server 2019.

You need to recommend a deployment strategy for the virtual machines. The strategy must meet the following requirements:

Ensure that the virtual machines maintain a consistent configuration.

Minimize administrative effort to configure the virtual machines.

What should you include in the recommendation?

A.
Azure Resource Manager templates and the PowerShell Desired State Configuration (DSC) extension for Windows
A.
Azure Resource Manager templates and the PowerShell Desired State Configuration (DSC) extension for Windows
Answers
B.
Deployment YAML and Azure pipeline deployment groups
B.
Deployment YAML and Azure pipeline deployment groups
Answers
C.
Azure Resource Manager templates and the Custom Script Extension for Windows
C.
Azure Resource Manager templates and the Custom Script Extension for Windows
Answers
D.
Deployment YAML and Azure pipeline stage templates
D.
Deployment YAML and Azure pipeline stage templates
Answers
Suggested answer: C

Explanation:

The Custom Script Extension downloads and executes scripts on Azure virtual machines. This extension is useful for post deployment configuration, software installation, or any other configuration or management tasks. Scripts can be downloaded from Azure storage or GitHub, or provided to the Azure portal at extension run time. The Custom Script Extension integrates with Azure Resource Manager templates, and can be run using the Azure CLI, PowerShell, Azure portal, or the Azure Virtual Machine REST API.

Incorrect Answers:

B: YAML doesn't work with Azure pipeline deployment groups.

Reference:

https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows

You have an Azure DevOps project that uses many package feeds.

You need to simplify the project by using a single feed that stores packages produced by your company and packages consumed from remote feeds. The solution must support public feeds and authenticated feeds. What should you enable in DevOps?

A.
Universal Packages
A.
Universal Packages
Answers
B.
upstream sources
B.
upstream sources
Answers
C.
views in Azure Artifacts
C.
views in Azure Artifacts
Answers
D.
a symbol server
D.
a symbol server
Answers
Suggested answer: C

SIMULATION

You plan to deploy a runbook that will create Azure AD user accounts.

You need to ensure that runbooks can run the Azure PowerShell cmdlets for Azure Active Directory.

To complete this task, sign in to the Microsoft Azure portal.

A.
See solution below.
A.
See solution below.
Answers
Suggested answer: A

Explanation:

Azure Automation now ships with the Azure PowerShell module of version 0.8.6, which introduced the ability to non-interactively authenticate to Azure using OrgId (Azure Active Directory user) credential-based authentication. Using the steps below, you can set up Azure Automation to talk to Azure using this authentication type.

Step 1: Find the Azure Active Directory associated with the Azure subscription to manage:

1. Log in to the Azure portal as the service administrator for the Azure subscription you want to manage using Azure Automation. You can find this user by logging in to the Azure portal as any user with access to this Azure subscription, then clicking Settings, then Administrators.

2. Note the name of the directory associated with the Azure subscription you want to manage. You can find this directory by clicking Settings, then Subscriptions.

Step 2: Create an Azure Active Directory user in the directory associated with the Azure subscription to manage:

You can skip this step if you already have an Azure Active Directory user in this directory. and plan to use this OrgId to manage Azure.

1. In the Azure portal click on Active Directory service.

2. Click the directory name that is associated with this Azure subscription.

3. Click on the Users tab and then click the Add User button.

4. For type of user, select “New user in your organization.” Enter a username for the user to create.

5. Fill out the user’s profile. For role, pick “User.” Don’t enable multi-factor authentication. Multi-factor accounts cannot be used with Azure Automation.

6. Click Create.

7. Jot down the full username (including part after @ symbol) and temporary password.

Step 3: Allow this Azure Active Directory user to manage this Azure subscription.

1. Click on Settings (bottom Azure tab under StorSimple)

2. Click Administrators

3. Click the Add button. Type the full user name (including part after @ symbol) of the Azure Active Directory user you want to set up to manage Azure. For subscriptions, choose the Azure subscriptions you want this user to be able to manage. Click the check mark.

Step 4: Configure Azure Automation to use this Azure Active Directory user to manage this Azure subscription Create an Azure Automation credential asset containing the username and password of the Azure Active Directory user that you have just created. You can create a credential asset in Azure Automation by clicking into an Automation Account and then clicking the Assets tab, then the Add Setting button.

Note: Once you have set up the Azure Active Directory credential in Azure and Azure Automation, you can now manage Azure from Azure Automation runbooks using this credential.

Reference:

https://azure.microsoft.com/sv-se/blog/azure-automation-authenticating-to-azure-using-azure-active-directory/

You use a Get repository in Azure Repos to manage the source code of a web application. Developers commit changes directly to the default branch.

You need to implement a change management procedure that meets the following requirements:

The default branch must be protected, and new changes must be built in the feature branches first.

Changes must be reviewed and approved by at least one release manager before each merge.

Changes must be brought into the default branch by using pull requests.

What should you configure in Azure Repos?

A.
branch policies of the default branch
A.
branch policies of the default branch
Answers
B.
Services in Project Settings
B.
Services in Project Settings
Answers
C.
Deployment pools in Project Settings
C.
Deployment pools in Project Settings
Answers
D.
branch security of the default branch
D.
branch security of the default branch
Answers
Suggested answer: A

Explanation:

Branch policies help teams protect their important branches of development. Policies enforce your team's code quality and change management standards.

Reference:

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

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 fast-forward merges.

Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: A

Explanation:

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

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 squash merges.

Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Instead use fast-forward merge.

Note:

Squash merge - Complete all pull requests with a squash merge, creating a single commit in the target branch with the changes from the source branch. 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

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 an explicit merge.

Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
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

Total 482 questions
Go to page: of 49