Microsoft Azure Administrator (AZ104) Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the Microsoft Azure Administrator (AZ104) Exam. Prepare with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


To copy contents from an on-premises folder to a public Azure Storage account container, which command is appropriate?

  1. azcopy sync D:\folder1 https://contosodata.blob.core.windows.net/public -- snapshot

  2. azcopy copy D:\folder1 https://contosodata.blob.core.windows.net/public -- recursive

  3. az storage blob copy start-batch D:\Folder1 https://contosodata.blob.core.windows.net/public

  4. https://contosodata.blob.core.windows.net/public

The correct answer is: azcopy copy D:\folder1 https://contosodata.blob.core.windows.net/public -- recursive

The correct answer involves using the `azcopy copy` command, specifically designed for copying files. In this case, it is the appropriate command to transfer files from a local on-premises folder to an Azure Storage account container. The `azcopy copy` command is optimized for one-time file transfers and ensures that all files from the specified local directory (in this case, `D:\folder1`) are copied to the designated Azure Blob Storage URL (`https://contosodata.blob.core.windows.net/public`). By adding the `--recursive` flag, the command ensures that not only the files in the root of `D:\folder1` are copied, but also all files in its subdirectories, which is essential for maintaining the directory structure during the transfer. Other commands presented in the choices are not suitable for this specific task. For example, `azcopy sync` is generally used for keeping files in sync between the source and destination, rather than just copying files. The `az storage blob copy start-batch` command is more suited for initiating batch copy operations on Azure Blob Storage but is not directly applicable for copying files from a local system. The last choice simply provides a URL without any associated actions, making it irrelevant for transferring files