external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.Commands.Compute.dll-Help.xml |
AzureRM.Compute |
18E1AD70-42A6-47A2-A685-6E218B6DC4BE |
2.0.0 |
Saves downloaded .vhd images locally.
Save-AzureRmVhd [-ResourceGroupName] <String> [-SourceUri] <Uri> [-LocalFilePath] <FileInfo>
[[-NumberOfThreads] <Int32>] [-OverWrite] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Save-AzureRmVhd [-StorageKey] <String> [-SourceUri] <Uri> [-LocalFilePath] <FileInfo>
[[-NumberOfThreads] <Int32>] [-OverWrite] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
The Save-AzureRmVhd cmdlet saves .vhd images from a blob where they are stored to a file. You can specify the number of downloader threads that the process uses and whether to replace a file that already exists. This cmdlet downloads content as it is. It does not apply any Virtual Hard Disk (VHD) format conversion.
PS C:\> Save-AzureRmVhd -SourceUri "http://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd" -LocalFilePath "C:\vhd\Win7Image.vhd" -ResourceGroupName "rgname"
This command downloads a .vhd file, and stores it in the local path C:\vhd\Win7Image.vhd.
PS C:\> Save-AzureRmVhd -SourceUri "http://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd" -LocalFilePath "C:\vhd\Win7Image.vhd" -Overwrite -ResourceGroupName "rgname"
This command downloads a .vhd file, and stores it in the local path. The command includes the Overwrite parameter. Therefore, if C:\vhd\Win7Image.vhd already exists, this command replaces it.
PS C:\> Save-AzureRmVhd -SourceUri "http://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd" -LocalFilePath "C:\vhd\Win7Image.vhd" -NumberOfThreads 32 -ResourceGroupName "rgname"
This command downloads a .vhd file, and stores it in the local path. The command specifies a value of 32 for the NumberOfThreads parameter. Therefore, the cmdlet uses 32 threads for this action.
PS C:\> Save-AzureRmVhd -SourceUri "http://contosoaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd" -LocalFilePath "C:\vhd\Win7Image.vhd" -StorageKey "zNvcH0r5vAGmC5AbwEtpcyWCMyBd3eMDbdaa4ua6kwxq6vTZH3Y+sw==" -ResourceGroupName "rgname"
This command downloads a .vhd file and specifies the storage key.
Run cmdlet in the background and return a Job to track progress.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the local file path of the saved image.
Type: System.IO.FileInfo
Parameter Sets: (All)
Aliases: lf
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the number of download threads that this cmdlet uses during download.
Type: System.Int32
Parameter Sets: (All)
Aliases: th
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Indicates that this cmdlet replaces the file specified by LocalFilePath file if it exists.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: o
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the resource group of the storage account.
Type: System.String
Parameter Sets: ResourceGroupParameterSetName
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the Uniform Resource Identifier (URI) of the blob in Azure
.
Type: System.Uri
Parameter Sets: (All)
Aliases: src, Source
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the storage key of the blob storage account. If you do not specify a key, this cmdlet attempts to determine the storage key of the account in SourceUri from Azure.
Type: System.String
Parameter Sets: StorageKeyParameterSetName
Aliases: sk
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).