< Back

Add-AzureDisk

Wed Jan 30, 2019 5:42 pm

NAME Add-AzureDisk



SYNOPSIS

Adds a disk to the Azure disk repository.





SYNTAX

Add-AzureDisk [-DiskName] <String> [-MediaLocation] <String> [-Label <String>] [-OS <String>] [-Profile <AzureSMProfile>] [-InformationAction

<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-DiskName <String>

Specifies the name of the disk that this cmdlet adds.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-MediaLocation <String>

Specifies the physical location of the disk in Azure Storage. This value refers to a blob page in the current subscription and storage account.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Label <String>

Specifies a disk label for the disk that this cmdlet adds.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-OS <String>

Specifies the operating system type for a system disk. Valid values are:



-- Windows



-- Linux





If you do not specify this parameter, the cmdlet adds the disk as a data disk.





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

DiskContext







NOTES









-------------------------- Example 1: Add a startup disk that uses the Windows operating system --------------------------



PS C:\\>Add-AzureDisk -DiskName "MyWinDisk" -MediaLocation "http://contosostorage.blob.core.azure.c ... system.vhd" -Label "StartupDisk" -OS

"Windows"



This command adds a system disk to your disk repository. The system disk uses the Windows operating system.

-------------------------- Example 2: Add a data disk --------------------------



PS C:\\>Add-AzureDisk -DiskName "MyDataDisk" -MediaLocation "http://yourstorageaccount.blob.core.azu ... r-data.vhd" -Label "DataDisk"



This command adds a data disk.

-------------------------- Example 3: Add a Linux system disk --------------------------



PS C:\\>Add-AzureDisk -DiskName "MyLinuxDisk" -MediaLocation "http://yourstorageaccount.blob.core.azu ... nuxsys.vhd" -OS "Linux"



This command adds a Linux system disk.



RELATED LINKS

Get-AzureDisk

Remove-AzureDisk

Update-AzureDisk