Set-AzVmssSecurityProfile

This cmdlet allows users to set the SecurityType enum for Virtual Machines scale sets.

Note

This is the previous version of our documentation. Please consult the most recent version for up-to-date information.

Syntax

Set-AzVmssSecurityProfile
   [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
   [[-SecurityType] <SecurityTypes>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Sets the Security Type of the VMSS

Examples

Example 1

$VMSS = Get-AzVmss -ResourceGroupName "ResourceGroup11" -VMScaleSetName "ContosoVM07"
$VMSS = Set-AzVmssSecurityProfile -VirtualMachineScaleSet $VMSS -SecurityType "TrustedLaunch"

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 sets the SecurityType enum to "TrustedLaunch"

Parameters

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SecurityType

Enum that represents the security type (ex: Trusted Launch)

Type:SecurityTypes
Accepted values:TrustedLaunch
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-VirtualMachineScaleSet

The virtual machine scale set profile.

Type:PSVirtualMachineScaleSet
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSVirtualMachineScaleSet

SecurityTypes

Outputs

PSVirtualMachineScaleSet