az guestconfig guest-configuration-hcrp-assignment

注意

此參考是 Azure CLI(2.3.1 版或更新版本的客體設定 延伸模組)的一部分 。 擴充功能會在您第一次執行 az guestconfig guest-configuration-hcrp-assignment 命令時自動安裝。 深入了解擴充功能。

此命令群組是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

Guestconfig guest-configuration-hcrp-assignment。

命令

名稱 Description 類型 狀態
az guestconfig guest-configuration-hcrp-assignment create

建立 ARC 機器與客體設定之間的關聯。

擴充 實驗性
az guestconfig guest-configuration-hcrp-assignment delete

刪除來賓設定指派。

擴充 實驗性
az guestconfig guest-configuration-hcrp-assignment list

列出 ARC 電腦的所有客體設定指派。

擴充 實驗性
az guestconfig guest-configuration-hcrp-assignment show

取得來賓設定指派的相關資訊。

擴充 實驗性
az guestconfig guest-configuration-hcrp-assignment update

建立 ARC 機器與客體設定之間的關聯。

擴充 實驗性
az guestconfig guest-configuration-hcrp-assignment wait

將 CLI 置於等候狀態,直到符合 guestconfig guest-configuration-hcrp-assignment 的條件為止。

擴充 實驗性

az guestconfig guest-configuration-hcrp-assignment create

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立 ARC 機器與客體設定之間的關聯。

az guestconfig guest-configuration-hcrp-assignment create --guest-configuration-assignment-name
                                                          --machine-name
                                                          --resource-group
                                                          [--context]
                                                          [--guest-configuration-configuration-parameter]
                                                          [--guest-configuration-configuration-setting]
                                                          [--guest-configuration-name]
                                                          [--guest-configuration-version]
                                                          [--latest-assignment-report-assignment]
                                                          [--location]
                                                          [--name]
                                                          [--no-wait]

範例

建立或更新來賓設定指派

az guestconfig guest-configuration-hcrp-assignment create --guest-configuration-assignment-name "WhitelistedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"

必要參數

--guest-configuration-assignment-name

來賓組態指派的名稱。

--machine-name

ARC 電腦的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--context

起始客體設定指派的來源。 例如:Azure 原則。

--guest-configuration-configuration-parameter

客體設定的組態參數。

使用方式:--guest-configuration-configuration-parameter name=XX value=XX

name:組態參數的名稱。 value:組態參數的值。

您可以使用多個 --guest-configuration-configuration-parameter 引數來指定多個動作。

--guest-configuration-configuration-setting

來賓設定的組態設定。

使用方式:--guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-after-reboot=XX refresh-frequency-min=XX reboot-if-required=XX configuration-mode-frequency-min=XX

組態模式:指定 LCM(本機組態管理員) 如何實際將設定套用至目標節點。 可能的值為 ApplyOnly、ApplyAndMonitor 和 ApplyAndAutoCorrect。 allow-module-overwrite:如果為 true - 允許從提取服務下載的新組態覆寫目標節點上的舊組態。 否則,false action-after-reboot:指定在設定應用程式期間重新開機後會發生什麼情況。 可能的值為 ContinueConfiguration 和 StopConfiguration refresh-frequency-minutes:時間間隔,以分鐘為單位,LCM 會檢查提取服務以取得更新的設定。 如果未在提取模式中設定 LCM,則會忽略此值。 預設值是 30。 reboot-if-required:將此值設定為 true,以在套用需要重新開機的設定之後自動重新開機節點。 否則,您必須針對需要節點的任何設定手動重新開機節點。 預設值為 false。 若要在 DSC 以外的專案(例如 Windows Installer)制定重新開機條件時使用此設定,請將此設定與 xPendingReboot 模組結合。 configuration-mode-frequency-minutes:檢查並套用目前設定的頻率,以分鐘為單位。 如果 ConfigurationMode 屬性設定為 ApplyOnly,就會忽略這個屬性。 預設值為 15。

--guest-configuration-name

來賓組態的名稱。

--guest-configuration-version

客體設定的版本。

--latest-assignment-report-assignment

客體設定指派的組態詳細資料。 預期值:json-string/@json-file。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--name

來賓組態指派的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az guestconfig guest-configuration-hcrp-assignment delete

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除來賓設定指派。

az guestconfig guest-configuration-hcrp-assignment delete [--guest-configuration-assignment-name]
                                                          [--ids]
                                                          [--machine-name]
                                                          [--no-wait]
                                                          [--resource-group]
                                                          [--subscription]

範例

刪除來賓設定指派

az guestconfig guest-configuration-hcrp-assignment delete --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"

選擇性參數

--guest-configuration-assignment-name

來賓組態指派的名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--machine-name

ARC 電腦的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az guestconfig guest-configuration-hcrp-assignment list

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出 ARC 電腦的所有客體設定指派。

az guestconfig guest-configuration-hcrp-assignment list --machine-name
                                                        --resource-group

範例

列出虛擬機器的所有客體設定指派

az guestconfig guest-configuration-hcrp-assignment list --machine-name "myMachineName" --resource-group "myResourceGroupName"

必要參數

--machine-name

ARC 電腦的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az guestconfig guest-configuration-hcrp-assignment show

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得來賓設定指派的相關資訊。

az guestconfig guest-configuration-hcrp-assignment show [--guest-configuration-assignment-name]
                                                        [--ids]
                                                        [--machine-name]
                                                        [--resource-group]
                                                        [--subscription]

範例

取得來賓設定指派

az guestconfig guest-configuration-hcrp-assignment show --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"

選擇性參數

--guest-configuration-assignment-name

來賓設定指派名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--machine-name

ARC 電腦的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az guestconfig guest-configuration-hcrp-assignment update

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立 ARC 機器與客體設定之間的關聯。

az guestconfig guest-configuration-hcrp-assignment update [--context]
                                                          [--guest-configuration-assignment-name]
                                                          [--guest-configuration-configuration-parameter]
                                                          [--guest-configuration-configuration-setting]
                                                          [--guest-configuration-name]
                                                          [--guest-configuration-version]
                                                          [--ids]
                                                          [--latest-assignment-report-assignment]
                                                          [--location]
                                                          [--machine-name]
                                                          [--name]
                                                          [--no-wait]
                                                          [--resource-group]
                                                          [--subscription]

範例

建立或更新來賓設定指派

az guestconfig guest-configuration-hcrp-assignment update --guest-configuration-assignment-name "WhitelistedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"

選擇性參數

--context

起始客體設定指派的來源。 例如:Azure 原則。

--guest-configuration-assignment-name

來賓組態指派的名稱。

--guest-configuration-configuration-parameter

客體設定的組態參數。

使用方式:--guest-configuration-configuration-parameter name=XX value=XX

name:組態參數的名稱。 value:組態參數的值。

您可以使用多個 --guest-configuration-configuration-parameter 引數來指定多個動作。

--guest-configuration-configuration-setting

來賓設定的組態設定。

使用方式:--guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-after-reboot=XX refresh-frequency-min=XX reboot-if-required=XX configuration-mode-frequency-min=XX

組態模式:指定 LCM(本機組態管理員) 如何實際將設定套用至目標節點。 可能的值為 ApplyOnly、ApplyAndMonitor 和 ApplyAndAutoCorrect。 allow-module-overwrite:如果為 true - 允許從提取服務下載的新組態覆寫目標節點上的舊組態。 否則,false action-after-reboot:指定在設定應用程式期間重新開機後會發生什麼情況。 可能的值為 ContinueConfiguration 和 StopConfiguration refresh-frequency-minutes:時間間隔,以分鐘為單位,LCM 會檢查提取服務以取得更新的設定。 如果未在提取模式中設定 LCM,則會忽略此值。 預設值是 30。 reboot-if-required:將此值設定為 true,以在套用需要重新開機的設定之後自動重新開機節點。 否則,您必須針對需要節點的任何設定手動重新開機節點。 預設值為 false。 若要在 DSC 以外的專案(例如 Windows Installer)制定重新開機條件時使用此設定,請將此設定與 xPendingReboot 模組結合。 configuration-mode-frequency-minutes:檢查並套用目前設定的頻率,以分鐘為單位。 如果 ConfigurationMode 屬性設定為 ApplyOnly,就會忽略這個屬性。 預設值為 15。

--guest-configuration-name

來賓組態的名稱。

--guest-configuration-version

客體設定的版本。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--latest-assignment-report-assignment

客體設定指派的組態詳細資料。 預期值:json-string/@json-file。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--machine-name

ARC 電腦的名稱。

--name

來賓組態指派的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az guestconfig guest-configuration-hcrp-assignment wait

實驗

命令群組 'guestconfig guest-configuration-hcrp-assignment' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將 CLI 置於等候狀態,直到符合 guestconfig guest-configuration-hcrp-assignment 的條件為止。

az guestconfig guest-configuration-hcrp-assignment wait [--created]
                                                        [--custom]
                                                        [--deleted]
                                                        [--exists]
                                                        [--guest-configuration-assignment-name]
                                                        [--ids]
                                                        [--interval]
                                                        [--machine-name]
                                                        [--resource-group]
                                                        [--subscription]
                                                        [--timeout]
                                                        [--updated]

範例

暫停執行下一行 CLI 腳本,直到客體設定 guest-configuration-hcrp-assignment 成功建立為止。

az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --created

暫停執行下一行 CLI 腳本,直到客體設定 guest-configuration-hcrp-assignment 成功刪除為止。

az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --deleted

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自訂 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--guest-configuration-assignment-name

來賓設定指派名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--interval

輪詢間隔以秒為單位。

預設值: 30
--machine-name

ARC 電腦的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。