Question 201 of 999
Design data storage solutionshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to create the container using New-AzStorageContainer. This error occurs because Set-AzStorageBlobContent requires an existing container as a destination; the cmdlet does not automatically create the container, so the script fails when the target container is missing. On the Microsoft Azure Solutions Architect Expert AZ-305 exam, this scenario tests your understanding of Azure Storage lifecycle management and the order of operations in PowerShell automation—a common trap is assuming Set-AzStorageBlobContent will create the container implicitly, which it does not. To resolve the "container does not exist" error, you must first run New-AzStorageContainer with the same -Name parameter used in the blob upload command. Remember the mnemonic: "Container first, blob last"—always ensure the container exists before attempting to upload content.

AZ-305 Design data storage solutions Practice Question

This AZ-305 practice question tests your understanding of design data storage solutions. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

$connectionString = "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=mykey;EndpointSuffix=core.windows.net"
$containerName = "mycontainer"
$blobName = "myblob.txt"
$content = "Hello, World!"

$ctx = New-AzStorageContext -ConnectionString $connectionString
Set-AzStorageBlobContent -Context $ctx -Container $containerName -Blob $blobName -Value $content -StandardBlobTier Hot

You run the above PowerShell script to upload a blob to Azure Storage. The script fails with an error: 'The specified container does not exist.' What should you do first to resolve the issue?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "first"

    Why it matters: Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

$connectionString = "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=mykey;EndpointSuffix=core.windows.net"
$containerName = "mycontainer"
$blobName = "myblob.txt"
$content = "Hello, World!"

$ctx = New-AzStorageContext -ConnectionString $connectionString
Set-AzStorageBlobContent -Context $ctx -Container $containerName -Blob $blobName -Value $content -StandardBlobTier Hot

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

Create the container using New-AzStorageContainer.

The error 'The specified container does not exist' indicates that the target container has not been created in the Azure Storage account. The PowerShell script uses the `Set-AzStorageBlobContent` cmdlet, which requires an existing container as the destination. Therefore, the first corrective action is to create the container using `New-AzStorageContainer` before uploading the blob.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Create the container using New-AzStorageContainer.

    Why this is correct

    The container must exist before uploading a blob.

    Clue confirmation

    The clue word "first" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use a different connection string with a SAS token.

    Why it's wrong here

    The connection string is valid; the issue is the missing container.

  • Grant the storage account key access to the user.

    Why it's wrong here

    The script uses the account key, which has full access.

  • Change the -StandardBlobTier parameter to Cool.

    Why it's wrong here

    The tier is not the issue; the container is missing.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse authentication/authorization issues (SAS tokens, key access) with the fundamental prerequisite of container existence, leading them to select options that address permissions rather than the missing resource.

Detailed technical explanation

How to think about this question

Azure Blob Storage requires a hierarchical namespace where containers act as logical groupings of blobs. The `Set-AzStorageBlobContent` cmdlet performs an HTTP PUT operation on the blob endpoint (e.g., `https://<account>.blob.core.windows.net/<container>/<blob>`), and if the container does not exist, the service returns a 404 (Not Found) error. Creating the container with `New-AzStorageContainer` issues a PUT request on the container endpoint, establishing the necessary namespace before blob uploads can succeed.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-305 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-305 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-305 question test?

Design data storage solutions — This question tests Design data storage solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create the container using New-AzStorageContainer. — The error 'The specified container does not exist' indicates that the target container has not been created in the Azure Storage account. The PowerShell script uses the `Set-AzStorageBlobContent` cmdlet, which requires an existing container as the destination. Therefore, the first corrective action is to create the container using `New-AzStorageContainer` before uploading the blob.

What should I do if I get this AZ-305 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "first". Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-305 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 AZ-305 exam.