Copy Archive Blob to New Blob - PowerShell Script | DP-203 Exam Prep

Copy Archive Blob to New Blob - PowerShell Script

Question

You are writing a PowerShell script to copy an archive blob to a new blob within the same storage account.

In the script, you need to initialize some variables.

From the below options, choose the variables that must be initialized with your blob names.

(Choose all that are applicable)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F. G.

Correct Answers: C and D

You can use a PowerShell Script to copy an archive blob to a new blob within the same storage account.

As can be seen from the given diagram, you need to initialize a number of variables with your resource group, container, storage account and blob names.

Here you must initialize the following variables with the corresponding names:

Option A is incorrect.

$accountName variable is initialized with your storage account name.

Option B is incorrect.

$rgName variable is initialized with resource group name.

Option C is correct.

$srcContainerName and $destContainerName variables are needed to be initialized with the blob names.

Option D is correct.

$srcContainerName and $destContainerName variables are needed to be initialized with the blob names.

Option E is incorrect.

There is no need to use or initialize $newBlobName to copy an archive blob to a new blob.

Option F is incorrect.

There is no need to use or initialize $archieveBlobName to copy an archive blob to a new blob.

Option G is incorrect.

There is no need to use or initialize $srcdestBlob to copy an archive blob to a new blob.

Reference:

To know more about Rehydrating blob data from the archive tier, please visit the below-given link:

To copy an archive blob to a new blob within the same storage account using PowerShell, the following variables must be initialized with your blob names:

C. $srcBlobName: This variable should be initialized with the name of the source archive blob that you want to copy.

D. $destBlobName: This variable should be initialized with the name of the new blob that you want to create.

Note that the destination blob name can be the same as the source blob name, as long as the destination container is different.

Here are the explanations for the other variables listed:

A. $accountName: This variable is not required for copying an archive blob to a new blob within the same storage account. It is used to specify the name of the storage account.

B. $rgName: This variable is also not required for copying an archive blob to a new blob within the same storage account. It is used to specify the name of the resource group where the storage account is located.

E. $newBlobName: This variable is not required for copying an archive blob to a new blob within the same storage account. It is used to specify the name of the new blob if you want to rename it during the copy process.

F. $archiveBlobName: This variable is not required for copying an archive blob to a new blob within the same storage account. It is not a valid variable name, and it is misspelled (should be "archiveBlobName").

G. $srcdestBlob: This variable is not required for copying an archive blob to a new blob within the same storage account. It is not a valid variable name, and it is unclear what it would be used for.