Skip to content

Latest commit

 

History

History
114 lines (85 loc) · 2.82 KB

Set-AzVMUefi.md

File metadata and controls

114 lines (85 loc) · 2.82 KB
external help file Module Name online version schema
Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml
Az.Compute
2.0.0

Set-AzVMUefi

SYNOPSIS

Modifies UEFI properties of a gen 2 virtual machine

SYNTAX

Set-AzVMUefi [-VM] <PSVirtualMachine> [-EnableVtpm <Boolean>] [-EnableSecureBoot <Boolean>]
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

DESCRIPTION

The Set-AzVMUefi cmdlet modifies UEFI properties of a virtual machine.

EXAMPLES

Example 1

$VM = Get-AzVM -ResourceGroupName "ResourceGroup11" -VMName "ContosoVM07"
Set-AzVMUefi -VM $VM -EnableVtpm $true -EnableSecureBoot $true

The first command gets the virtual machine named ContosoVM07 by using Get-AzVM. The command stores it in the $VM variable. The second command modifies the UEFI settings to enable SecureBoot and vTPM on the virtual machine in $VM. The command passes the result to the Update-AzVM cmdlet, which implements your changes. A change to the cashing mode causes the virtual machine to restart.

PARAMETERS

-DefaultProfile

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

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableSecureBoot

Parameter to toggle secure boot on the VM

Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EnableVtpm

Parameter to toggle vTPM on the VM

Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VM

The virtual machine profile.

Type: Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine
Parameter Sets: (All)
Aliases: VMProfile

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine

System.Boolean

OUTPUTS

Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine

NOTES

RELATED LINKS