Set-AzVM
Marks a virtual machine as generalized.
Syntax
Set-AzVM
[-ResourceGroupName] <String>
[-Name] <String>
[-Generalized]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzVM
[-ResourceGroupName] <String>
[-Name] <String>
[-Redeploy]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzVM
[-Id] <String>
[-Name] <String>
[-Generalized]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzVM
[-Id] <String>
[-Name] <String>
[-Redeploy]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzVM cmdlet marks a virtual machine as generalized. Before you run this cmdlet, log on to the virtual machine and use Sysprep to prepare the hard disk.
Examples
Example 1: Mark a virtual machine as generalized
PS C:\> Set-AzVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine07" -Generalized
This command marks the virtual machine named VirtualMachine07 as generalized.
Parameters
-AsJob
Run cmdlet in the background and return a Job to track progress.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Generalized
Indicates that this cmdlet marks a virtual machine as generalized.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specifies the Resource ID of the virtual machine.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the virtual machine on which this cmdlet operates.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Redeploy
Indicates that this cmdlet manually redeploys the virtual machine to a different Azure host to fix any problems.
If you redeploy a virtual machine, it restarts, which results in the loss of ephemeral drive data.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group of the virtual machine.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
None
This cmdlet does not accept any input.