< Back

Set-AzureRmVM

Tue Jan 29, 2019 9:39 pm

NAME Set-AzureRmVM



SYNOPSIS

Marks a virtual machine as generalized.





SYNTAX

Set-AzureRmVM [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -Generalized [<CommonParameters>]



Set-AzureRmVM [-Id] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -Generalized [<CommonParameters>]



Set-AzureRmVM [-Id] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -Redeploy [<CommonParameters>]



Set-AzureRmVM [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -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.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background and return a Job to track progress.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Generalized [<SwitchParameter>]

Indicates that this cmdlet marks a virtual machine as generalized.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Id <String>

Specifies the Resource ID of the virtual machine.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

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



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Redeploy [<SwitchParameter>]

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.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Compute.Models.PSComputeLongRunningOperation







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... -azurermvm

Get-AzureRmVmssDiskEncryption