New-EntraDomain
建立一個網域。
語法
Default (預設值)
New-EntraDomain
-Name <String>
[-IsDefault <Boolean>]
[-SupportedServices <System.Collections.Generic.List`1[System.String]>]
[<CommonParameters>]
Description
該指令檔在 New-EntraDomain Microsoft Entra ID 中建立一個網域。
在委派情境中,登入使用者必須擁有支援的 Microsoft Entra 角色或具備必要權限的自訂角色。 此作業所需的最低角色包括:
- 網域名稱管理員
範例
範例 1:建立新網域
Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo.com
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo.com Managed True False False False False {}
此範例示範如何在 Microsoft Entra ID 中建立新網域。
範例 2:建立一個包含網域功能清單的新網域
Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline')
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo1.com Managed True False False False False {}
此範例示範如何在 Microsoft Entra ID 中建立指定服務的新網域。
範例 3:建立一個新網域,並設定為預設的新使用者建立
Connect-Entra -Scopes 'Domain.ReadWrite.All'
New-EntraDomain -Name testingDemo2.com -IsDefault $True
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- -----------------
testingDemo2.com Managed True False False False False {}
此範例示範如何在 Microsoft Entra ID 中建立新網域,並將其標記為新使用者建立的預設網域。
參數
-IsDefault
顯示此是否為使用者建立的預設網域。
每家公司只有一個預設網域。
參數屬性
| 類型: | System.Boolean |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Name
網域名稱的完全限定。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-SupportedServices
分配給網域的能力。
參數屬性
| 類型: | System.Collections.Generic.List`1[System.String] |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。