You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **Set-ADDomainMode** cmdlet sets the domain mode for a domain.
25
-
You specify the domain mode by setting the *DomainMode* parameter.
26
25
27
-
The *Identity* parameter specifies the Active Directory domain to modify.
28
-
You can identify a domain by its distinguished name, GUID, security identifier (SID), DNS domain name, or NetBIOS name.
29
-
You can also set the *Identity* parameter to a domain object variable such as `$<localADDomainObject>`, or you can pass a domain object through the pipeline to the *Identity* parameter.
30
-
For example, you can use the Get-ADDomain cmdlet to retrieve a domain object and then pass the object through the pipeline operator to the **Set-ADDomainMode** cmdlet.
26
+
The `Set-ADDomainMode` cmdlet sets the domain mode for a domain. You specify the domain mode by
27
+
setting the **DomainMode** parameter.
31
28
32
-
The **Set-ADDomainMode** cmdlet always prompts for permission unless you specify *Confirm:$False*.
29
+
The **Identity** parameter specifies the Active Directory domain to modify. You can identify a
30
+
domain by its distinguished name, GUID, security identifier (SID), DNS domain name, or NetBIOS
31
+
name. You can also set the **Identity** parameter to a domain object variable such as
32
+
`$<localADDomainObject>`, or you can pass a domain object through the pipeline to the **Identity**
33
+
parameter. For example, you can use the `Get-ADDomain` cmdlet to retrieve a domain object and then
34
+
pass the object through the pipeline operator to the `Set-ADDomainMode` cmdlet.
35
+
36
+
The `Set-ADDomainMode` cmdlet always prompts for permission unless you specify **Confirm:$False**.
33
37
34
38
## EXAMPLES
35
39
36
40
### Example 1: Set the domain mode of a specified user to Windows2003Domain
This example sets the **DomainMode** of the current logged on user's domain to Windows2003Domain.
@@ -52,8 +58,8 @@ The set operation targets the PrimaryDC FSMO to apply the update.
52
58
## PARAMETERS
53
59
54
60
### -AuthType
55
-
Specifies the authentication method to use.
56
-
The acceptable values for this parameter are:
61
+
62
+
Specifies the authentication method to use. The acceptable values for this parameter are:
57
63
58
64
- Negotiate or 0
59
65
- Basic or 1
@@ -75,33 +81,22 @@ Accept pipeline input: False
75
81
Accept wildcard characters: False
76
82
```
77
83
78
-
### -Confirm
79
-
Prompts you for confirmation before running the cmdlet.
80
-
81
-
```yaml
82
-
Type: SwitchParameter
83
-
Parameter Sets: (All)
84
-
Aliases: cf
85
-
86
-
Required: False
87
-
Position: Named
88
-
Default value: False
89
-
Accept pipeline input: False
90
-
Accept wildcard characters: False
91
-
```
92
-
93
84
### -Credential
94
-
Specifies the user account credentials to use to perform this task.
95
-
The default credentials are the credentials of the currently logged on user unless the cmdlet is run from an Active Directory module for Windows PowerShell provider drive.
96
-
If the cmdlet is run from such a provider drive, the account associated with the drive is the default.
97
85
98
-
To specify this parameter, you can type a user name, such as User1 or Domain01\User01 or you can specify a **PSCredential** object.
99
-
If you specify a user name for this parameter, the cmdlet prompts for a password.
86
+
Specifies the user account credentials to use to perform this task. The default credentials are the
87
+
credentials of the currently logged on user unless the cmdlet is run from an Active Directory
88
+
module for Windows PowerShell provider drive. If the cmdlet is run from such a provider drive, the
89
+
account associated with the drive is the default.
90
+
91
+
To specify this parameter, you can type a user name, such as `User1` or `Domain01\User01` or you can
92
+
specify a **PSCredential** object. If you specify a user name for this parameter, the cmdlet
93
+
prompts for a password.
100
94
101
-
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
102
-
You can then set the *Credential* parameter to the **PSCredential** object.
95
+
You can also create a **PSCredential** object by using a script or by using the `Get-Credential`
96
+
cmdlet. You can then set the **Credential** parameter to the **PSCredential** object.
103
97
104
-
If the acting credentials do not have directory-level permission to perform the task, Active Directory module for Windows PowerShell returns a terminating error.
98
+
If the acting credentials do not have directory-level permission to perform the task, Active
99
+
Directory module for Windows PowerShell returns a terminating error.
Specifies the domain functional level of the first domain in the creation of a new forest.
120
-
Supported values for this parameter can be either a valid integer or a corresponding enumerated string value.
121
-
For example, to set the domain mode level to Windows Server 2008 R2, you can specify either a value of **4** or **Windows2008R2Domain**.
116
+
Supported values for this parameter can be either a valid integer or a corresponding enumerated
117
+
string value. For example, to set the domain mode level to Windows Server 2008 R2, you can specify
118
+
either a value of **4** or **Windows2008R2Domain**.
122
119
123
120
The following are the currently supported values:
124
121
@@ -130,16 +127,18 @@ The following are the currently supported values:
130
127
- Windows Server 2012: **5** or **Windows2012Domain**
131
128
- Windows Server 2012 R2: **6** or **Windows2012R2Domain**
132
129
- Windows Server 2016: **7** or **WinThreshold**
130
+
- Windows Server 2025: **10** or **Windows2025Domain**
133
131
134
132
The domain functional level cannot be lower than the forest functional level, but it can be higher.
135
-
The functional level can be increased, and also decreased as long as no feature that requires that functional level is in use, such as the Active Directory Recycle Bin.
136
-
The default is automatically computed and set.
133
+
The functional level can be increased, and also decreased as long as no feature that requires that
134
+
functional level is in use, such as the Active Directory Recycle Bin. The default is automatically
Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server.
198
-
The service may be any of the following: Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory snapshot instance.
199
+
200
+
Specifies the Active Directory Domain Services instance to connect to, by providing one of the
201
+
following values for a corresponding domain name or directory server. The service may be any of the
202
+
following: Active Directory Lightweight Domain Services, Active Directory Domain Services or Active
203
+
Directory snapshot instance.
199
204
200
205
Specify the Active Directory Domain Services instance in one of the following ways:
201
206
@@ -210,10 +215,12 @@ Directory server values:
210
215
- NetBIOS name
211
216
- Fully qualified directory server name and port
212
217
213
-
The default value for this parameter is determined by one of the following methods in the order that they are listed:
218
+
The default value for this parameter is determined by one of the following methods in the order
219
+
that they are listed:
214
220
215
-
- By using the *Server* value from objects passed through the pipeline
216
-
- By using the server information associated with the Active Directory Domain Services Windows PowerShell provider drive, when the cmdlet runs in that drive
221
+
- By using the **Server** value from objects passed through the pipeline
222
+
- By using the server information associated with the Active Directory Domain Services Windows
223
+
PowerShell provider drive, when the cmdlet runs in that drive
217
224
- By using the domain of the computer running Windows PowerShell
218
225
219
226
```yaml
@@ -228,9 +235,25 @@ Accept pipeline input: False
228
235
Accept wildcard characters: False
229
236
```
230
237
238
+
### -Confirm
239
+
240
+
Prompts you for confirmation before running the cmdlet.
241
+
242
+
```yaml
243
+
Type: SwitchParameter
244
+
Parameter Sets: (All)
245
+
Aliases: cf
246
+
247
+
Required: False
248
+
Position: Named
249
+
Default value: False
250
+
Accept pipeline input: False
251
+
Accept wildcard characters: False
252
+
```
253
+
231
254
### -WhatIf
232
-
Shows what would happen if the cmdlet runs.
233
-
The cmdlet is not run.
255
+
256
+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
271
+
272
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
0 commit comments