Courseiva
Implement natural language processing solutionshardMultiple ChoiceObjective-mapped

AI-102 Practice Question: Implement natural language processing solutions

Exhibit

Refer to the exhibit.

$az = Get-AzResource -ResourceGroupName 'myRG' -ResourceType 'Microsoft.CognitiveServices/accounts' -Name 'myLangService'
$az.Properties.apiProperties.textAnalytics.documentEndpoint = 'https://eastus.api.cognitive.microsoft.com/text/analytics/v3.1/entities/health/general'
Set-AzResource -ResourceId $az.ResourceId -Properties $az.Properties -Force

A PowerShell script (exhibit) attempts to update the endpoint for an Azure AI Language resource. What is the outcome of running this script?

⚠ Common exam trap

It's easy for candidates to assume the 'endpoint' property is a simple string that can be updated like any other resource property, overlooking that it is a read-only system-generated attribute in Azure Cognitive Services.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The script fails because the property does not exist

The PowerShell script attempts to set the 'endpoint' property on an existing Azure AI Language resource using the `Set-AzCognitiveServicesAccount` cmdlet. However, the 'endpoint' property is read-only and cannot be modified after resource creation; it is generated automatically by Azure based on the resource's name and region. Attempting to update it results in a failure because the property does not exist as a writable attribute in the resource's schema.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The script creates a new resource

    Why it's wrong here

    Set-AzResource updates an existing resource.

  • The script changes the API version

    Why it's wrong here

    The script does not modify the API version.

  • The script updates the endpoint successfully

    Why it's wrong here

    The property path is incorrect.

  • The script fails because the property does not exist

    Why this is correct

    The property path is invalid, causing an error.

About these practice questions

One of 945 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.