Azure AzCopy and PowerShell Commands with Simple Examples
|
Command |
Simple example |
Purpose |
|---|---|---|
|
|
|
Copies a file to Azure Blob Storage. |
|
|
|
Copies all files and subfolders recursively. |
|
|
|
Synchronizes source and destination changes. |
|
|
|
Lists files and folders in a directory. |
|
|
|
Lists files and folders, including subfolders. |
|
|
|
Uploads a file to a Blob Storage container. |
|
|
|
Lists blobs in a container. |
|
|
|
Lists containers in a storage account. |
|
|
|
Creates a new blob container. |
|
|
|
Deletes a blob. |
|
|
|
Retrieves storage account details in a resource group. |
|
|
|
Creates a storage account. |
|
|
|
Signs in to Azure PowerShell. |
|
|
|
Lists accessible Azure subscriptions. |
|
|
|
Selects the active subscription. |
|
|
|
Lists resource groups. |
|
|
|
Lists virtual machines in a resource group. |
|
|
|
Starts a virtual machine. |
|
|
|
Stops a virtual machine. |
|
|
|
Restarts a virtual machine. |
Important points for AZ-104
-
AzCopy is a command-line utility for transferring data to and from Azure Storage.
-
--recursiveincludes files in subdirectories. -
azcopy syncsynchronizes differences; review deletion behavior before using it. -
Set-AzStorageBlobContentuploads files using Azure PowerShell. -
$ctxrepresents an Azure Storage context containing the required storage connection and authentication information. -
<SAS>is a placeholder for a valid Shared Access Signature; replace it with an appropriately scoped SAS token. Do not include the angle brackets.