Изменить

Поделиться через


Set-AzVmssUefi

Modifies UEFI properties of gen 2 virtual machines that are part of virtual machine scale sets

Syntax

Default (Default)

Set-AzVmssUefi
    [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
    [[-EnableVtpm] <Boolean>]
    [[-EnableSecureBoot] <Boolean>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Set-AzVmssUefi cmdlet modifies UEFI properties of virtual machines in a virtual machine scale set.

Examples

Example 1

$VMSS = Get-AzVmss -ResourceGroupName "ResourceGroup11" -VMScaleSetName "ContosoVM07"
Set-AzVmssUefi -VirtualMachineScaleSet $VMSS -EnableVtpm $true -EnableSecureBoot $true

The first command gets the virtual machine scale set named ContosoVM07 by using Get-AzVmss. The command stores it in the $VMSS variable. The second command modifies the UEFI settings to enable SecureBoot and vTPM on virtual machines in $VMSS. The command passes the result to the Update-AzVmss 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.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableSecureBoot

Parameter to toggle secure boot on the VMs of the scale set

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EnableVtpm

Parameter to toggle vTPM on the VMs of the scale set

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-VirtualMachineScaleSet

The virtual machine scale set profile.

Parameter properties

Type:PSVirtualMachineScaleSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

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

Inputs

PSVirtualMachineScaleSet

Boolean

Outputs

PSVirtualMachineScaleSet