Edit

Share via


Set-AzVMProxyAgentSetting

Sets the Proxy Agent settings properties for a PSVirtualMachine object.

Syntax

Default (Default)

Set-AzVMProxyAgentSetting
    -VM <PSVirtualMachine>
    [-EnableProxyAgent <Boolean>]
    [-WireServerMode <String>]
    [-WireServerProfile <String>]
    [-ImdsMode <String>]
    [-ImdsProfile <String>]
    [-KeyIncarnationId <Int32>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Sets the Proxy Agent settings properties for a PSVirtualMachine object.

Examples

Example 1

$vmconfig = New-AzVMConfig -VMName $vmName -VMSize "Standard_D2s_v3"
Set-AzVMProxyAgentSetting -VM $vmconfig -EnableProxyAgent $true -WireServerMode "Enforce" -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 configuration object $vmconfig. It enables the Proxy Agent, sets the Wire Server mode to "Enforce", 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

-KeyIncarnationId

Increase the value of this parameter allows users to reset the key used for securing communication channel between guest and host.

Parameter properties

Type:

Nullable<T>[Int32]

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

-VM

PSVirtualMachine object created from New-AzVMConfig.

Parameter properties

Type:PSVirtualMachine
Default value:None
Supports wildcards:False
DontShow:False
Aliases:VirtualMachine

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

PSVirtualMachine

SwitchParameter

String

Int32

Outputs

PSVirtualMachine