Wriju's BLOG

.NET, Cloud and everything

Azure PowerShell Know the differences

There are a bunch of confusing PowerShell commands which looks the same by their name.

Add-AzureDataDisk : Adds a data disk to a virtual machine.

The Add-AzureDataDisk cmdlet adds a new or existing data disk to an Azure virtual machine object. Use the CreateNew 
parameter to create a new data disk that has a specified size and label. Use the Import parameter to attach an 
existing disk from the image repository. Use the ImportFrom parameter to attach an existing disk from a blob in a 
storage account. You can specify the host-cache mode of the attached data disk.

Add-AzureDisk: Adds a disk to the Azure disk repository.

The Add-AzureDisk cmdlet adds a disk to the Azure disk repository in the current subscription. This cmdlet can add a 
system disk or a data disk. To add a system disk, specify an operating system type by using the OS parameter.

Add-AzureVMImage: Adds a new operating system image or a new virtual machine image to the image repository.

The Add-AzureVMImage cmdlet adds a new operating system image or a new virtual machine image to the image repository.
The image is a generalized operating system image, using either Sysprep for Windows or, for Linux, using the
appropriate tool for the distribution.

Add-AzureVhd: Uploads a VHD file from an on-premise machine to a blob in a cloud storage account in Azure.

The Add-AzureVhd cmdlet uploads on premise Virtual hard disk (VHD) images to a blob storage account as fixed .vhd
images. It has parameters to configure the upload process such as specifying the number of uploader threads that will
be used or overwriting a blob which already exists in the specified destination URI. For on premise VHD images,
patching scenario is also supported so that diff disk images can be uploaded without having to upload the already
uploaded base images.  Shared Access Signature (SAS) URI is also supported.

Namoskar!!!