Set-​Azure​Rm​VM

Marks a virtual machine as generalized.

Syntax

Set-AzureRmVM
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Generalized]
   [<CommonParameters>]
Set-AzureRmVM
   [-Id] <String>
   [-Name] <String>
   [-Generalized]
   [<CommonParameters>]
Set-AzureRmVM
   [-Id] <String>
   [-Name] <String>
   [-Redeploy]
   [<CommonParameters>]
Set-AzureRmVM
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Redeploy]
   [<CommonParameters>]

Description

The Set-AzureRmVM 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-AzureRmVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine07" -Generalized

This command marks the virtual machine named VirtualMachine07 as generalized.

Required Parameters

-Generalized

Indicates that this cmdlet marks a virtual machine as generalized.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Id

Specifies the Resource ID of the virtual machine.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the name of the virtual machine on which this cmdlet operates.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
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:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group of the virtual machine.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False