10 out of 18 rated this helpful - Rate this topic

CSUpload Command-Line Tool

Updated: June 7, 2012

The CSUpload Command-Line Tool (CSUpload.exe) is used to upload VHD files to Windows Azure and to upload service certificates that can be used for remote desktop connections. VHD files can be used for the following purposes:

If you installed the SDK to the default location, in Windows Azure SDK versions 1.7 and greater, CSUpload can be found in the C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\<sdk-version>\bin folder. In versions 1.6 and earlier, CSPack is installed to the C:\Program Files\Windows Azure SDK\<sdk-version>\bin.

CSUpload [options] [parameters]

The following table lists the options for CSUpload. To view the most current option list, type CSUpload Get-Help at a Windows Azure SDK command prompt.

noteNote
Having trouble viewing this topic in the Windows Azure library? Try viewing it in the MSDN library.

 

Option Description

Add-ServiceCertificate

Add a service certificate from the personal certificate store of the user to the cloud services certificate store.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in the Windows Azure Platform Management Portal.

  • –HostedServiceName <string> – Specifies the name that is used to communicate with the cloud service. This value can be found in the Deployment Name property of the cloud service in the Management Portal, or you can obtain the value from Name in the results of running CSUpload with the Get-HostedService option.

  • –PublicKeyOnly – (Optional) Specifies that the certificate is added without a private key.

  • –Thumbprint <string> – Specifies the thumbprint of the service certificate that you are adding. For more information about creating certificates and obtaining the thumbprint of a certificate, see Create a Service Certificate for Windows Azure.

Add-StatelessVMImage

Specifies the VHD file to upload to Windows Azure that is to be used for an instance of a VM Role. The following parameters are used to specify information about the VHD file:

  • –LiteralPath <string> – Specifies the location and name of the VHD file.

  • –Name <string> – Specifies the name that is used for the VHD in the Management Portal. This name can be different than the file name. Valid names are up to 512 characters long, end in .VHD, and can contain the following:

    • ASCII characters that are uppercase or lowercase

    • Decimal digits

    • The characters '-' and '.'

    • The name can start with a '-' character, but not end with one.

  • –AffinityGroup <string> – (Optional, but you must specify either –AffinityGroup or -Location) Specifies the name of the affinity group to which the VHD should be added.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in the Management Portal.

  • –Description <string> – (Optional) Specifies a description for the VHD.

  • –KeepTempFiles – (Optional) Indicates that temporary files that were created during the process of uploading the VHD file should be retained.

  • –Location <string> – (Optional, but you must specify either –AffinityGroup or -Location) Specifies the Windows Azure data center location to which this VHD file should be uploaded. Possible locations are:

    • East Asia

    • North Central US

    • North Europe

    • South Central US

    • Southeast Asia

    • West Europe

  • –SkipVerify – (Optional) Indicates that the validity of the VHD is not verified. For example, you may want to use an image from an operating system that does not support VHD mounting.

  • -SkipSecurityPrompt – Indicates that automated deployment should not be prevented.

  • –TempLocation <string> – (Optional) Specifies an optional temporary local location where working files are kept. You may need to use this if you are uploading from a read-only location.

noteNote
When you use this option, the Windows Azure VHD Verification Tool is run to verify that the VHD file is in the proper state to be uploaded to Windows Azure. You will be asked in a dialog box to click OK to continue the verification process.

Clear-Connection

Clears the value of the connection string by setting the value to null.

Get-AffinityGroup

Returns a list of the available affinity groups. The following parameter is used to get the affinity group information:

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net ". You can find the subscription identifier and certificate thumbprint in the Management Portal.

Get-Connection

Returns the current connection string.

Get-HostedService

Returns the available information about cloud services in a specified subscription. The following parameters are used to specify VHD information:

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net ". You can find the subscription identifier and certificate thumbprint in the Management Portal.

  • –Name <string> – (Optional, if not specified, all cloud services are listed) Specifies the name of the cloud service. This value can be found in the Deployment Name property of the cloud service in the Management Portal.

Get-Location

Returns the available list of Windows Azure data center locations. The following parameter is used to get the location information:

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net ". You can find the subscription identifier and certificate thumbprint in the Management Portal.

Get-StatelessVMImage

Returns a list of the available VHDs that have been uploaded for use with an instance of a VM Role. The following parameters are used to get a list of VHDs:

  • –Name <string> – Specifies the name of the VHD for which information is obtained. If this parameter is not provided, a list of information about all VHDs is returned.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net ". You can find the subscription identifier and certificate thumbprint in the Management Portal.

The following information is returned for all available VHDs:

  • Name

  • Label

  • Description

  • Affinity group

  • Status

  • UUID

  • Timestamp

  • Mounted size in bytes

  • Compressed size in bytes

Remove-StatelessVMImage

Removes the specified VHD file that is used for instances of a VM Role from the image repository. This option is not intended for VHD files that are used for Virtual Machines. The following parameters are used to remove a VHD:

  • –Name <string> – Specifies the name of the VHD that is to be removed.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net ". You can find the subscription identifier and certificate thumbprint in Management Portal.

Set-Connection <string>

Enables you to set a persistent value for the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in the Management Portal.

Set-Parent

Enables you to associate a differencing VHD file as a child to the parent base VHD file that has been uploaded to Windows Azure. This option is not intended for VHD files that are used for Virtual Machines. The following parameters are used to set the relationship between VHDs:

  • –Child <string> – Specifies the name of the differencing VHD that is associated with base VHD.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • –Parent <string> – Specifies the base VHD that is associated with the differencing VHD.

Add-Disk

Specifies a VHD file to be uploaded as a disk. A VHD file that has been uploaded as a disk can be used to create a virtual machine if the file contains an operating system or it can be used to create a data disk that can be attached to a virtual machine.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Destination <string> - Specifies the blob storage account where the VHD file is stored. The destination includes the endpoint of the account, the container in the account where the file is stored, and the name of the VHD file. For example,"http://auxpreview146imagestore.blob.core.azure-preview.com/mydisks/mydisk.vhd"

  • -Label <string> - Specifies the identifier that is used for the disk in the Management Portal.

  • -LiteralPath <string> - Specifies the location and name of the VHD file to upload as a disk.

  • -Name <string> - (Optional) Specifies the name to be used for the VHD file that is being uploaded.

  • -OS <string> - (Optional) If the VHD file that is being uploaded contains an operating system to be used with a virtual machine, you must include this parameter with the value of Windows or Linux depending on the type of operating system that is installed.

  • -Overwrite – (Optional) Indicates that you intend to overwrite an existing VHD file with a new file.

Add-PersistentVMImage

Specifies a VHD file that is uploaded as an image to be used as a template for creating virtual machines.

  • -BaseImage <string> - (Optional) Specifies that this VHD file represents a base image.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Destination <string> - Specifies the blob storage account where the VHD file is stored. The destination includes the endpoint of the account, the container in the account where the file is stored, and the name of the VHD file. For example,"http://auxpreview146imagestore.blob.core.azure-preview.com/mydisks/mydisk.vhd"

  • -Label <string> - Specifies the identifier that is used for the disk in the Management Portal.

  • -LiteralPath <string> - Specifies the location and name of the VHD file to upload as a disk.

  • -Name <string> - (Optional) Specifies the name to be used for the VHD file that is being uploaded.

  • -OS <string> - (Optional) If the VHD file that is being uploaded contains an operating system to be used with a virtual machine, you must include this parameter with the value of Windows or Linux depending on the type of operating system that is installed.

  • -Overwrite – (Optional) Indicates that you intend to overwrite an existing VHD file with a new file.

Get-Disk

Returns the available information about a disk. If no parameters are provided, a list of all available disks is returned. The following information is returned about the disks:

  • Name

  • Label

  • Location

  • LogicalDiskSizeInGB

  • MediaLink

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Name <string> - Specifies the name of the disk for which information is obtained. If a name is provided, the following additional information is returned:

    • DeploymentName

    • RoleName

    • HostedServiceName

Get-PersistentVMImage

Returns the available information an image that is intended for a virtual machine. If no parameters are provided, a list of all available images is returned. The following information is returned about the images:

  • Name

  • Label

  • AffinityGroup

  • Location

  • OS

  • LogicalSizeInGB

  • MediaLink

  • Category

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Name <string> - Specifies the name of the image for which information is obtained.

Remove-Disk

Removes the specified disk from the disk repository.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Name <string> - Specifies the name of the disk to be removed.

Remove-PersistentVMImage

Removes the specified VHD file that is used for virtual machines. This option is not used for images that are intended for VM Role instances.

  • –Connection <string> – (Optional if the Set-Connection command has been run) Specifies the connection string that is used to connect to Windows Azure. The connection string contains the identifier of your Windows Azure subscription and the thumbprint of the management certificate that you created to enable API access to the subscription. The connection string is provided in the following format: "SubscriptionID=subscription-id;CertificateThumbprint=cert-thumbprint;ServiceManagementEndpoint=https://management.core.windows.net". You can find the subscription identifier and certificate thumbprint in Management Portal.

  • -Name <string> - Specifies the name of the image to be removed.

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.