共用方式為


Set-AzVmssProxyAgentSetting

設定 PSVirtualMachineScaleSet 物件的 Proxy 代理程式設定屬性。

語法

Default (預設值)

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

Description

設定 PSVirtualMachineScaleSet 物件的 Proxy 代理程式設定屬性。

範例

範例 1

$vmssConfig = New-AzVmssConfig -Location 'EastUS2' -SkuName 'Standard_D4s_v3'
Set-AzVmssProxyAgentSetting -VirtualMachineScaleSet $vmssConfig -EnableProxyAgent $true -AddProxyAgentExtension false -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}'

此命令會設定虛擬機器擴展集組態物件 $vmssConfig的 Proxy 代理程式設定。 它會啟用 Proxy 代理程式、指定「有線伺服器」設定檔,以及指定 IMDS 設定檔。

參數

-AddProxyAgentExtension

指定是否隱含地安裝 ProxyAgent 延伸模組。 此選項目前僅適用於 Linux 作業系統。

參數屬性

類型:

Nullable<T>[Boolean]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-EnableProxyAgent

指定是否應啟用中繼資料安全通訊協定 (ProxyAgent) 特性。

參數屬性

類型:

Nullable<T>[Boolean]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ImdsMode

指定 IMDS 端點執行模式。 在稽核模式中,系統的作用就像是強制執行訪問控制原則,包括在記錄中發出存取拒絕專案,但它實際上不會拒絕任何對主機端點的要求。 在 [強制執行] 模式中,系統會強制執行訪問控制,這是建議的作業模式。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ImdsProfile

指定 IMDS enpoint 中的 InVMAccessControlProfileVersion 資源識別碼。 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} 的格式

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-VirtualMachineScaleSet

PSVirtualMachineScaleSet 從 New-AzVMSSConfig 建立的物件。

參數屬性

類型:PSVirtualMachineScaleSet
預設值:None
支援萬用字元:False
不要顯示:False
別名:虛擬機器

參數集

(All)
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-WireServerMode

指定建立虛擬機器或虛擬機器擴展集時的 Wire Server 端點執行模式。 在稽核模式中,系統的作用就像是強制執行訪問控制原則,包括在記錄中發出存取拒絕專案,但它實際上不會拒絕任何對主機端點的要求。 在 [強制執行] 模式中,系統會強制執行訪問控制,這是建議的作業模式。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-WireServerProfile

指定 InVMAccessControlProfileVersion Wire Server 端點中的資源識別碼。 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} 的格式

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

PSVirtualMachineScaleSet

SwitchParameter

String

輸出

PSVirtualMachineScaleSet