Edit

Share via


Set-AzVmssProxyAgentSetting

Sets the Proxy Agent settings properties for a PSVirtualMachineScaleSet object.

Syntax

Default (Default)

Set-AzVmssProxyAgentSetting
    -VirtualMachineScaleSet <PSVirtualMachineScaleSet>
    [-EnableProxyAgent <Boolean>]
    [-WireServerMode <String>]
    [-WireServerProfile <String>]
    [-ImdsMode <String>]
    [-ImdsProfile <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Sets the Proxy Agent settings properties for a PSVirtualMachineScaleSet object.

Examples

Example 1

$vmssConfig = New-AzVmssConfig -Location 'EastUS2' -SkuName 'Standard_D4s_v3'
Set-AzVmssProxyAgentSetting -VirtualMachineScaleSet $vmssConfig -EnableProxyAgent $true -WireServerProfile '/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}' -ImdsProfile '/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}'

This command sets the Proxy Agent settings for a virtual machine scale set configuration object $vmssConfig. It enables the Proxy Agent, specifies the Wire Server profile, and specifies the IMDS profile.

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

-EnableProxyAgent

Specifies whether Metadata Security Protocol(ProxyAgent) feature should be enabled or not.

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ImdsMode

Specifies the IMDS endpoint execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.

Parameter properties

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

Parameter sets

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

-ImdsProfile

Specifies the InVMAccessControlProfileVersion resource id in the IMDS enpoint. Format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}

Parameter properties

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

Parameter sets

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

-VirtualMachineScaleSet

PSVirtualMachineScaleSet object created from New-AzVMSSConfig.

Parameter properties

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

Parameter sets

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

-WireServerMode

Specifies the Wire Server endpoint execution mode while creating the virtual machine or virtual machine scale set. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.

Parameter properties

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

Parameter sets

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

-WireServerProfile

Specifies the InVMAccessControlProfileVersion resource id in the Wire Server endpoint. Format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
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

SwitchParameter

String

Outputs

PSVirtualMachineScaleSet