az connectedmachine

注意

此參考是 Azure CLI 的 connectedmachine 擴充功能的一部分(2.49.0 版或更高版本)。 擴充功能會在您第一次執行 az connectedmachine 命令時自動安裝。 深入了解擴充功能。

管理已啟用 Azure Arc 的伺服器。

命令

名稱 Description 類型 狀態
az connectedmachine assess-patches

評估已啟用 Azure Arc 的伺服器上的修補程式。

副檔名 GA
az connectedmachine delete

刪除作業以刪除已啟用 Azure Arc 的伺服器。

副檔名 GA
az connectedmachine extension

在已啟用 Azure Arc 的伺服器上管理 VM 擴充功能。

副檔名 GA
az connectedmachine extension create

要建立延伸模組的作業。

副檔名 GA
az connectedmachine extension delete

要刪除延伸模組的作業。

副檔名 GA
az connectedmachine extension image

管理適用於已啟用 Azure Arc 的伺服器的 VM 擴充功能元數據。

副檔名 GA
az connectedmachine extension image list

根據位置、發行者、extensionType 列出所有擴充功能版本。

副檔名 GA
az connectedmachine extension image show

根據位置、發行者、extensionType和版本取得延伸模組元數據。

副檔名 GA
az connectedmachine extension list

取得非 Azure 機器之所有延伸模組的作業。

副檔名 GA
az connectedmachine extension show

建立或更新延伸模組的作業。

副檔名 GA
az connectedmachine extension update

更新作業以更新擴充功能。

副檔名 GA
az connectedmachine extension wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 GA
az connectedmachine install-patches

在已啟用 Azure Arc 的伺服器上安裝修補程式。

副檔名 GA
az connectedmachine list

列出指定資源群組中的所有已啟用 Azure Arc 的伺服器。

副檔名 GA
az connectedmachine private-endpoint-connection

使用已啟用 Azure Arc 的伺服器管理私人端點連線。

副檔名 GA
az connectedmachine private-endpoint-connection delete

刪除具有指定名稱的私人端點連線。

副檔名 GA
az connectedmachine private-endpoint-connection list

列出私人連結範圍上的所有私人端點連線。

副檔名 GA
az connectedmachine private-endpoint-connection show

取得私人端點連線。

副檔名 GA
az connectedmachine private-endpoint-connection update

使用指定名稱更新私人端點連線。

副檔名 GA
az connectedmachine private-endpoint-connection wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 GA
az connectedmachine private-link-resource

管理已啟用 Azure Arc 的伺服器的私人連結資源。

副檔名 GA
az connectedmachine private-link-resource list

列出需要為 Azure 監視器 PrivateLinkScope 建立的私人鏈接資源。

副檔名 GA
az connectedmachine private-link-resource show

取得需要為 Azure 監視器 PrivateLinkScope 建立的私人鏈接資源。

副檔名 GA
az connectedmachine private-link-scope

管理已啟用 Azure Arc 的伺服器的私人連結範圍。

副檔名 GA
az connectedmachine private-link-scope create

建立 Azure Arc PrivateLinkScope(或更新)。 注意:您無法在 Put 作業中為 InstrumentationKey 或 AppId 指定不同的值。

副檔名 GA
az connectedmachine private-link-scope delete

刪除 Azure Arc PrivateLinkScope。

副檔名 GA
az connectedmachine private-link-scope list

取得資源群組內的 Azure Arc PrivateLinkScopes 清單。 並取得訂用帳戶內所有 Azure Arc PrivateLinkScopes 的清單。

副檔名 GA
az connectedmachine private-link-scope show

傳回 Azure Arc PrivateLinkScope。

副檔名 GA
az connectedmachine private-link-scope update

更新 Azure Arc PrivateLinkScope。 注意:您無法在 Put 作業中為 InstrumentationKey 或 AppId 指定不同的值。

副檔名 GA
az connectedmachine private-link-scope update-tag

更新現有的 PrivateLinkScope 標籤。 若要更新其他欄位,請使用 CreateOrUpdate 方法。

副檔名 GA
az connectedmachine private-link-scope wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 GA
az connectedmachine run-command

在已啟用 Azure Arc 的伺服器上管理執行命令。

副檔名 預覽
az connectedmachine run-command create

建立作業以建立或更新執行命令。

副檔名 預覽
az connectedmachine run-command delete

刪除作業以刪除執行命令。

副檔名 預覽
az connectedmachine run-command list

列出作業以取得非 Azure 機器的所有執行命令。

副檔名 預覽
az connectedmachine run-command show

取得作業以取得執行命令。

副檔名 預覽
az connectedmachine run-command update

更新作業以建立或更新執行命令。

副檔名 預覽
az connectedmachine run-command wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 預覽
az connectedmachine show

取得 Azure Arc 已啟用伺服器之模型檢視或實例檢視的相關信息。

副檔名 GA
az connectedmachine update

更新已啟用 Azure Arc 的伺服器。 請注意,某些屬性只能在機器建立期間設定。

副檔名 GA
az connectedmachine upgrade-extension

升級計算機延伸模組的作業。

副檔名 GA

az connectedmachine assess-patches

評估已啟用 Azure Arc 的伺服器上的修補程式。

az connectedmachine assess-patches [--ids]
                                   [--name]
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--resource-group]
                                   [--subscription]

範例

評估修補程式的範例命令

az connectedmachine assess-patches --resource-group MyResourceGroup --name MyMachine

選擇性參數

--ids

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

--name -n

混合式計算機的名稱。

--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--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 connectedmachine delete

刪除作業以刪除已啟用 Azure Arc 的伺服器。

az connectedmachine delete [--ids]
                           [--machine-name]
                           [--resource-group]
                           [--subscription]
                           [--yes]

範例

刪除的範例命令

az connectedmachine delete --name myMachine --resource-group myResourceGroup

選擇性參數

--ids

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

--machine-name --name -n

混合式計算機的名稱。

--resource-group -g

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

--subscription

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

--yes -y

不提示確認。

預設值: 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 connectedmachine install-patches

在已啟用 Azure Arc 的伺服器上安裝修補程式。

az connectedmachine install-patches --maximum-duration
                                    --reboot-setting {Always, IfRequired, Never}
                                    [--ids]
                                    [--linux-parameters]
                                    [--name]
                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                    [--resource-group]
                                    [--subscription]
                                    [--windows-parameters]

範例

安裝修補程式的範例命令

az connectedmachine install-patches --resource-group MyResourceGroup --name MyMachine --maximum-duration PT4H --reboot-setting IfRequired --windows-parameters "{"classificationsToInclude": ["Critical", "Security"]}"

必要參數

--maximum-duration

指定作業執行的時間上限。 它必須是符合 ISO 8601 規範的持續時間字串,例如 PT4H(4 小時)。

--reboot-setting

定義在軟體更新作業期間可接受重新啟動 VM 的時機。

接受的值: Always, IfRequired, Never

選擇性參數

--ids

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

--linux-parameters

Linux VM 上的 InstallPatches 輸入,如 API 支援速記語法、json-file 和 yaml-file 直接接收。 請嘗試 “??” 以顯示更多。

--name -n

混合式計算機的名稱。

--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

--subscription

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

--windows-parameters

Windows VM 上的 InstallPatches 輸入,如 API 支援速記語法、json-file 和 yaml-file 直接接收。 請嘗試 “??” 以顯示更多。

全域參數
--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 connectedmachine list

列出指定資源群組中的所有已啟用 Azure Arc 的伺服器。

az connectedmachine list --resource-group
                         [--expand]

範例

清單的範例命令

az connectedmachine list --resource-group myResourceGroup
az connectedmachine list

必要參數

--resource-group -g

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

選擇性參數

--expand

展開參考的資源。

全域參數
--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 connectedmachine show

取得 Azure Arc 已啟用伺服器之模型檢視或實例檢視的相關信息。

az connectedmachine show [--expand {instanceView}]
                         [--ids]
                         [--machine-name]
                         [--resource-group]
                         [--subscription]

範例

show 的範例命令

az connectedmachine show --name myMachine --resource-group myResourceGroup

選擇性參數

--expand

要套用至作業的展開表達式。

接受的值: instanceView
--ids

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

--machine-name --name -n

混合式計算機的名稱。

--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 connectedmachine update

更新已啟用 Azure Arc 的伺服器。 請注意,某些屬性只能在機器建立期間設定。

az connectedmachine update [--add]
                           [--agent-upgrade]
                           [--client-public-key]
                           [--expand {instanceView}]
                           [--extensions]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--identity]
                           [--ids]
                           [--kind {AVS, AWS, EPS, GCP, HCI, SCVMM, VMware}]
                           [--license-profile]
                           [--location-data]
                           [--machine-name]
                           [--mssql-discovered]
                           [--os-profile]
                           [--os-type]
                           [--parent-cluster-id]
                           [--private-link-scope-resource-id]
                           [--remove]
                           [--resource-group]
                           [--service-statuses]
                           [--set]
                           [--subscription]
                           [--tags]

範例

更新的範例命令

az connectedmachine update --name myMachine --resource-group myResourceGroup --location eastus2euap

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value、string 或 JSON 字串>。

--agent-upgrade

計算機 w.r.t 代理程序升級支援速記語法、json-file 和 yaml-file 的資訊。 請嘗試 “??” 以顯示更多。

--client-public-key

用戶端在初始資源上線期間所提供的公鑰。

--expand

要套用至作業的展開表達式。

接受的值: instanceView
--extensions

計算機延伸模組資訊 (已取代字段) 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--identity

資源的身分識別。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--ids

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

--kind

指出內部部署的 Arc 機器放置類型,例如 HCI、SCVMM 或 VMware 等。

接受的值: AVS, AWS, EPS, GCP, HCI, SCVMM, VMware
--license-profile

指定計算機的授權相關屬性。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--location-data

與資源地理位置相關的元數據。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--machine-name --name -n

混合式計算機的名稱。

--mssql-discovered

指定電腦上是否探索到任何 MS SQL 實例。

--os-profile

指定混合式電腦的作業系統設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--os-type

操作系統的類型(windows/linux)。

--parent-cluster-id --parent-cluster-resource-id

如果有任何的話,此計算機會指派給父叢集的資源標識符(Azure HCI)。

--private-link-scope-resource-id --scope-id

此計算機指派給私人連結範圍的資源標識符,如果有的話。

--remove

從清單中移除屬性或專案。 範例:--remove property.list OR --remove 屬性ToRemove。

--resource-group -g

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

--service-statuses

回報回 ARM 之相依服務的狀態。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=。

--subscription

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

--tags

資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

全域參數
--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 connectedmachine upgrade-extension

升級計算機延伸模組的作業。

az connectedmachine upgrade-extension [--extension-targets]
                                      [--ids]
                                      [--machine-name]
                                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--resource-group]
                                      [--subscription]

範例

延伸模組升級的範例命令

az connectedmachine extension upgrade --machine-name "myMachineName" --resource-group "myResourceGroup" --subscription "mySubscription" --targets "{"Microsoft.Compute.CustomScriptExtension": "{"targetVersion": "1.10"}", "Microsoft.Azure.Monitoring": "{"targetVersion": "2.0"}"}"

選擇性參數

--extension-targets

描述延伸模組目標屬性。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--ids

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

--machine-name

混合式計算機的名稱。

--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--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 來取得完整偵錯記錄。