共用方式為


az ad ds

Note

此參考是 Azure CLI 廣告延伸模組 的一部分(2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az ad ds 命令時自動安裝。 深入了解擴充功能。

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

使用 Azure Active Directory 管理網域服務。

命令

名稱 Description 類型 狀態
az ad ds create

使用指定的參數建立新的網域服務。

Extension Experimental
az ad ds delete

刪除網域服務作業會刪除現有的 Domain Service。

Extension Experimental
az ad ds list

列出資源群組或訂用帳戶中的網域服務。

Extension Experimental
az ad ds show

取得指定的網域服務。

Extension Experimental
az ad ds update

更新網域服務的現有部署屬性。

Extension Experimental
az ad ds wait

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

Extension Experimental

az ad ds create

實驗

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

使用指定的參數建立新的網域服務。

az ad ds create --domain
                --name
                --replica-sets
                --resource-group
                [--domain-config-type {FullySynced, ResourceTrusting}]
                [--external-access {Disabled, Enabled}]
                [--filtered-sync {Disabled, Enabled}]
                [--ldaps {Disabled, Enabled}]
                [--no-wait]
                [--notify-dc-admins {Disabled, Enabled}]
                [--notify-global-admins {Disabled, Enabled}]
                [--notify-others]
                [--ntlm-v1 {Disabled, Enabled}]
                [--pfx-cert]
                [--pfx-cert-pwd]
                [--resource-forest {Disabled, Enabled}]
                [--settings]
                [--sku {Enterprise, Premium, Standard}]
                [--sync-kerberos-pwd {Disabled, Enabled}]
                [--sync-ntlm-pwd {Disabled, Enabled}]
                [--sync-on-prem-pwd {Disabled, Enabled}]
                [--tags]
                [--tls-v1 {Disabled, Enabled}]

範例

建立網域服務

az ad ds create --domain "TestDS.com" --replica-sets location="West US" subnet-id="<subnetId>" --name "TestDS.com" --resource-group "rg"

使用指定設定建立網域服務 (僅限可讀性的換行符)

az ad ds create --domain "TestDS.com" --replica-sets location="West US" subnet-id="<subnetId>" --name "TestDS.com" --resource-group "rg"
--ntlm-v1 "Enabled" --sync-ntlm-pwd "Enabled" --tls-v1 "Disabled" --filtered-sync "Enabled" --external-access "Enabled"
--ldaps "Enabled" --pfx-cert "cert or path to cert" --pfx-cert-pwd "<pfxCertificatePassword>"
--notify-others "a@gmail.com" "b@gmail.com" --notify-dc-admins "Enabled" --notify-global-admins "Enabled"

必要參數

--domain

使用者想要部署 Domain Services 的 Azure 網域名稱。

--name -n

網域服務的名稱。

--replica-sets

ReplicaSets 的清單。

使用方式:--replica-sets location=XX subnet-id=XX

location:虛擬網路位置 subnet-id:網域服務將部署所在的子網標識符。

您可以使用多個 --replica-sets 自變數來指定多個動作。

--resource-group -g

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--domain-config-type

網域組態類型。

屬性
接受的值: FullySynced, ResourceTrusting
--external-access

用來判斷是否啟用或停用因特網上安全LDAP存取的旗標。

屬性
參數群組: Ldaps Settings Arguments
接受的值: Disabled, Enabled
--filtered-sync

已啟用或停用旗標,以開啟以群組為基礎的篩選同步處理。

屬性
接受的值: Disabled, Enabled
--ldaps

用來判斷安全 LDAP 是否已啟用或停用的旗標。

屬性
參數群組: Ldaps Settings Arguments
接受的值: Disabled, Enabled
--no-wait

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

屬性
預設值: False
--notify-dc-admins

域控制器管理員應收到通知。

屬性
參數群組: Notification Settings Arguments
接受的值: Disabled, Enabled
--notify-global-admins

應通知全域管理員。

屬性
參數群組: Notification Settings Arguments
接受的值: Disabled, Enabled
--notify-others

其他收件者的清單。

屬性
參數群組: Notification Settings Arguments
--ntlm-v1

用來判斷是否啟用或停用 NtlmV1 的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--pfx-cert

設定安全 LDAP 所需的憑證。 這裡傳遞的參數應該是憑證 pfx 檔案的檔案路徑,或憑證 pfx 檔案的base64encoded表示法。

屬性
參數群組: Ldaps Settings Arguments
--pfx-cert-pwd

解密所提供安全 LDAP 憑證 pfx 檔案的密碼。

屬性
參數群組: Ldaps Settings Arguments
--resource-forest

資源樹系。

屬性
參數群組: Resource Forest Settings Arguments
接受的值: Disabled, Enabled
--settings

資源樹系的設定清單。 這可以是 JSON 格式字串或包含 JSON 物件的檔案位置。

資源樹系的設定 JSON 物件格式: [ { “trusted_domain_fqdn”: “XX”、“trust_direction”、“: ”XX“、”friendly_name“、”: “XX”、“remote_dns_ips”、“XX”、“trust_password”: “XX” }、 ...n ].

屬性
參數群組: Resource Forest Settings Arguments
--sku

Sku 類型。

屬性
接受的值: Enterprise, Premium, Standard
--sync-kerberos-pwd

用來判斷 SyncKerberosPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--sync-ntlm-pwd

用來判斷 SyncNtlmPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--sync-on-prem-pwd

用來判斷 SyncOnPremPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--tls-v1

用來判斷 TlsV1 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az ad ds delete

實驗

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

刪除網域服務作業會刪除現有的 Domain Service。

az ad ds delete [--ids]
                [--name]
                [--no-wait]
                [--resource-group]
                [--subscription]
                [--yes]

範例

刪除網域服務

az ad ds delete --name "TestDomainService.com" --resource-group "TestResourceGroup"

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

網域服務的名稱。

屬性
參數群組: Resource Id Arguments
--no-wait

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

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

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
--yes -y

請勿提示確認。

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

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az ad ds list

實驗

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

列出資源群組或訂用帳戶中的網域服務。

az ad ds list [--resource-group]

範例

依群組列出網域服務

az ad ds list --resource-group "TestResourceGroup"

依子列出網域服務

az ad ds list

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az ad ds show

實驗

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

取得指定的網域服務。

az ad ds show [--ids]
              [--name]
              [--resource-group]
              [--subscription]

範例

取得網域服務

az ad ds show --name "TestDomainService.com" --resource-group "TestResourceGroup"

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

網域服務的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az ad ds update

實驗

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

更新網域服務的現有部署屬性。

az ad ds update [--domain-config-type {FullySynced, ResourceTrusting}]
                [--external-access {Disabled, Enabled}]
                [--filtered-sync {Disabled, Enabled}]
                [--ids]
                [--ldaps {Disabled, Enabled}]
                [--name]
                [--no-wait]
                [--notify-dc-admins {Disabled, Enabled}]
                [--notify-global-admins {Disabled, Enabled}]
                [--notify-others]
                [--ntlm-v1 {Disabled, Enabled}]
                [--pfx-cert]
                [--pfx-cert-pwd]
                [--replica-sets]
                [--resource-forest {Disabled, Enabled}]
                [--resource-group]
                [--settings]
                [--sku {Enterprise, Premium, Standard}]
                [--subscription]
                [--sync-kerberos-pwd {Disabled, Enabled}]
                [--sync-ntlm-pwd {Disabled, Enabled}]
                [--sync-on-prem-pwd {Disabled, Enabled}]
                [--tags]
                [--tls-v1 {Disabled, Enabled}]

範例

更新sku

az ad ds update --name "TestDS.com" --resource-group "rg" --sku "Enterprise"

更新網域安全性設定

az ad ds update --name "TestDS.com" --resource-group "rg" --ntlm-v1 "Enabled" --tls-v1 "Disabled"

更新 ldaps 設定

az ad ds update --name "TestDS.com" --resource-group "rg" --external-access "Enabled" --ldaps "Enabled" --pfx-cert "MIIDPDCCAiSg..." --pfx-cert-pwd "<pfxCertificatePassword>"

更新通知設定

az ad ds update --name "TestDS.com" --resource-group "rg" --notify-dc-admins "Enabled" --notify-global-admins "Disabled"

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--domain-config-type

網域組態類型。

屬性
接受的值: FullySynced, ResourceTrusting
--external-access

用來判斷是否啟用或停用因特網上安全LDAP存取的旗標。

屬性
參數群組: Ldaps Settings Arguments
接受的值: Disabled, Enabled
--filtered-sync

已啟用或停用旗標,以開啟以群組為基礎的篩選同步處理。

屬性
接受的值: Disabled, Enabled
--ids

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

屬性
參數群組: Resource Id Arguments
--ldaps

用來判斷安全 LDAP 是否已啟用或停用的旗標。

屬性
參數群組: Ldaps Settings Arguments
接受的值: Disabled, Enabled
--name -n

網域服務的名稱。

屬性
參數群組: Resource Id Arguments
--no-wait

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

屬性
預設值: False
--notify-dc-admins

域控制器管理員應收到通知。

屬性
參數群組: Notification Settings Arguments
接受的值: Disabled, Enabled
--notify-global-admins

應通知全域管理員。

屬性
參數群組: Notification Settings Arguments
接受的值: Disabled, Enabled
--notify-others

其他收件者的清單。

屬性
參數群組: Notification Settings Arguments
--ntlm-v1

用來判斷是否啟用或停用 NtlmV1 的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--pfx-cert

設定安全 LDAP 所需的憑證。 這裡傳遞的參數應該是憑證 pfx 檔案的檔案路徑,或憑證 pfx 檔案的base64encoded表示法。

屬性
參數群組: Ldaps Settings Arguments
--pfx-cert-pwd

解密所提供安全 LDAP 憑證 pfx 檔案的密碼。

屬性
參數群組: Ldaps Settings Arguments
--replica-sets

ReplicaSets 的清單。

使用方式:--replica-sets location=XX subnet-id=XX

location:虛擬網路位置 subnet-id:網域服務將部署所在的子網標識符。

您可以使用多個 --replica-sets 自變數來指定多個動作。

--resource-forest

資源樹系。

屬性
參數群組: Resource Forest Settings Arguments
接受的值: Disabled, Enabled
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--settings

資源樹系的設定清單。 這可以是 JSON 格式字串或包含 JSON 物件的檔案位置。

資源樹系的設定 JSON 物件格式: [ { “trusted_domain_fqdn”: “XX”、“trust_direction”、“: ”XX“、”friendly_name“、”: “XX”、“remote_dns_ips”、“XX”、“trust_password”: “XX” }、 ...n ].

屬性
參數群組: Resource Forest Settings Arguments
--sku

Sku 類型。

屬性
接受的值: Enterprise, Premium, Standard
--subscription

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

屬性
參數群組: Resource Id Arguments
--sync-kerberos-pwd

用來判斷 SyncKerberosPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--sync-ntlm-pwd

用來判斷 SyncNtlmPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--sync-on-prem-pwd

用來判斷 SyncOnPremPasswords 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--tls-v1

用來判斷 TlsV1 是否已啟用或停用的旗標。

屬性
參數群組: Domain Security Settings Arguments
接受的值: Disabled, Enabled
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az ad ds wait

實驗

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

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

az ad ds wait [--created]
              [--custom]
              [--deleted]
              [--exists]
              [--ids]
              [--interval]
              [--name]
              [--resource-group]
              [--subscription]
              [--timeout]
              [--updated]

範例

暫停執行下一行 CLI 腳本,直到成功建立廣告 ds 為止。

az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --created

暫停執行下一行 CLI 腳本,直到廣告 ds 成功更新為止。

az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --updated

暫停執行下一行 CLI 腳本,直到成功刪除 ad ds 為止。

az ad ds wait --name "TestDomainService.com" --resource-group "TestResourceGroup" --deleted

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--created

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

屬性
參數群組: Wait Condition Arguments
預設值: False
--custom

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

屬性
參數群組: Wait Condition Arguments
--deleted

等到刪除為止。

屬性
參數群組: Wait Condition Arguments
預設值: False
--exists

等候資源存在。

屬性
參數群組: Wait Condition Arguments
預設值: False
--ids

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

屬性
參數群組: Resource Id Arguments
--interval

輪詢間隔以秒為單位。

屬性
參數群組: Wait Condition Arguments
預設值: 30
--name -n

網域服務的名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
--timeout

以秒為單位的等候上限。

屬性
參數群組: Wait Condition Arguments
預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

屬性
參數群組: Wait Condition Arguments
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False