Add-SCACAzureImage
Applies To: System Center 2012 R2 App Controller
Add-SCACAzureImage
Adds a virtual hard drive to the Windows Azure image store.
Syntax
Parameter Set: SourcePath
Add-SCACAzureImage -Cloud <ACAzureSubscriptionCloud> -DisplayName <String> -Name <String> -OperatingSystem <OperatingSystemType> {Windows | Linux} -SourcePath <String> -StorageBlob <Uri> [-Force] [ <CommonParameters>]
Parameter Set: SourceVHD
Add-SCACAzureImage -Cloud <ACAzureSubscriptionCloud> -DisplayName <String> -Name <String> -OperatingSystem <OperatingSystemType> {Windows | Linux} -SourceVHD <Object> -StorageBlob <Uri> [-Force] [ <CommonParameters>]
Detailed Description
The Add-SCACAzureImage cmdlet adds a virtual hard drive to the Windows Azure image store.
You must import the Virtual Machine Manager (VMM) module into your session to run this cmdlet.
Parameters
-Cloud<ACAzureSubscriptionCloud>
Specifies a Windows Azure subscription cloud object. To retrieve a subscription cloud object, use the Get-SCACAzureSubscription cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DisplayName<String>
Specifies a display name for the image in Windows Azure.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Indicates that the image is added to the Windows Azure image store without prompting for confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of the image.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-OperatingSystem<OperatingSystemType>
Specifies the operating system type for the virtual hard disk. Valid values are: Windows, Linux.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SourcePath<String>
Specifies a path to the source image.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SourceVHD<Object>
Specifies the source virtual hard disk object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageBlob<Uri>
Specifies the URI where the image is stored in Windows Azure.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Add a VHD image to the Windows Azure image store
The first command gets the Windows Azure subscription object named “AzureSubscription01” and stores the object in the $Subscription variable.
The second command gets the virtual hard disk object named VHD01.vhd and stores the object in the $VHD variable.
The last command adds the VHD image to the image store and names it Image01.
PS C:\> $Subscription = Get-SCACAzureSubscription –Name “AzureSubscription01”
PS C:\> $VHD = Get-SCVirtualHardDisk -Name "VHD01.vhd"
PS C:\> Add-SCACAzureImage –Name "Image01" -DisplayName "Image01" -Cloud $Subscription -StorageBlob "http://container01.blob.core.windows.net/vhds/VHD01.vhd" -SourceVHD $VHD -OperatingSystem "Windows"