< Back
Save-AzureVMImage
Post
NAME Save-AzureVMImage
SYNOPSIS
Captures and saves the image of a stopped Azure virtual machine.
SYNTAX
Save-AzureVMImage [-ServiceName] <String> [-Name] <String> [-ImageName] <String> [[-ImageLabel] <String>] [[-OSState] <String>] [-Profile
<AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
The Save-AzureVMImage cmdlet captures and saves the image of a stopped Azure virtual machine. For Windows virtual machines, run the Sysprep tool to
prepare the image before it is captured. After the image is captured, the virtual machine is deleted.
PARAMETERS
-ServiceName <String>
Specifies the name of the Azure service.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the source virtual machine.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageName <String>
Specifies the name of the virtual machine image.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageLabel <String>
Specifies the label of the virtual machine image.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OSState <String>
Specifies the operation system state for the virtual machine image. Use this parameter if you intend to capture a virtual machine image to Azure.
Valid values are:
-- Generalized
-- Specialized
Required? false
Position? 4
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
NOTES
-------------------------- Example 1: Save an existing virtual machine and then delete it from a deployment --------------------------
PS C:\\>Save-AzureVMImage -ServiceName "MyService" -Name "MyVM" -NewImageName "MyBaseImage" -NewImageLabel "MyBaseVM"
This command captures an existing virtual machine and deletes it from the deployment.
RELATED LINKS
Add-AzureVMImage
Get-AzureVMImage
Remove-AzureVMImage
Update-AzureVMImage
SYNOPSIS
Captures and saves the image of a stopped Azure virtual machine.
SYNTAX
Save-AzureVMImage [-ServiceName] <String> [-Name] <String> [-ImageName] <String> [[-ImageLabel] <String>] [[-OSState] <String>] [-Profile
<AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
The Save-AzureVMImage cmdlet captures and saves the image of a stopped Azure virtual machine. For Windows virtual machines, run the Sysprep tool to
prepare the image before it is captured. After the image is captured, the virtual machine is deleted.
PARAMETERS
-ServiceName <String>
Specifies the name of the Azure service.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the source virtual machine.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageName <String>
Specifies the name of the virtual machine image.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageLabel <String>
Specifies the label of the virtual machine image.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OSState <String>
Specifies the operation system state for the virtual machine image. Use this parameter if you intend to capture a virtual machine image to Azure.
Valid values are:
-- Generalized
-- Specialized
Required? false
Position? 4
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
NOTES
-------------------------- Example 1: Save an existing virtual machine and then delete it from a deployment --------------------------
PS C:\\>Save-AzureVMImage -ServiceName "MyService" -Name "MyVM" -NewImageName "MyBaseImage" -NewImageLabel "MyBaseVM"
This command captures an existing virtual machine and deletes it from the deployment.
RELATED LINKS
Add-AzureVMImage
Get-AzureVMImage
Remove-AzureVMImage
Update-AzureVMImage