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 **Get-ADComputer** cmdlet gets a computer or performs a search to retrieve multiple computers.
40
45
41
-
The *Identity* parameter specifies the Active Directory computer to retrieve.
46
+
The _Identity_ parameter specifies the Active Directory computer to retrieve.
42
47
You can identify a computer by its distinguished name, GUID, security identifier (SID) or Security Accounts Manager (SAM) account name.
43
-
You can also set the parameter to a computer object variable, such as `$<localComputerobject>` or pass a computer object through the pipeline to the *Identity* parameter.
48
+
You can also set the parameter to a computer object variable, such as `$<localComputerobject>` or pass a computer object through the pipeline to the _Identity_ parameter.
44
49
45
-
To search for and retrieve more than one computer, use the *Filter* or *LDAPFilter* parameters.
46
-
The *Filter* parameter uses the PowerShell Expression Language to write query strings for Active Directory.
47
-
PowerShell Expression Language syntax provides rich type conversion support for value types received by the *Filter* parameter.
48
-
For more information about the *Filter* parameter syntax, type `Get-Help`[about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
49
-
If you have existing Lightweight Directory Access Protocol (LDAP) query strings, you can use the *LDAPFilter* parameter.
50
+
To search for and retrieve more than one computer, use the _Filter_ or _LDAPFilter_ parameters.
51
+
The _Filter_ parameter uses the PowerShell Expression Language to write query strings for Active Directory.
52
+
PowerShell Expression Language syntax provides rich type conversion support for value types received by the _Filter_ parameter.
53
+
For more information about the _Filter_ parameter syntax, type `Get-Help`[about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
54
+
If you have existing Lightweight Directory Access Protocol (LDAP) query strings, you can use the _LDAPFilter_ parameter.
50
55
51
56
This cmdlet retrieves a default set of computer object properties.
52
-
To retrieve additional properties use the *Properties* parameter.
53
-
For more information about the how to determine the properties for computer objects, see the *Properties* parameter description.
57
+
To retrieve additional properties use the _Properties_ parameter.
58
+
For more information about the how to determine the properties for computer objects, see the _Properties_ parameter description.
54
59
55
60
## EXAMPLES
56
61
57
62
### Example 1: Get specific computer that shows all properties
Specifies the user account credentials to use to perform this task.
232
245
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.
233
246
If the cmdlet is run from such a provider drive, the account associated with the drive is the default.
@@ -236,7 +249,7 @@ To specify this parameter, you can type a user name, such as User1 or Domain01\U
236
249
If you specify a user name for this parameter, the cmdlet prompts for a password.
237
250
238
251
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
239
-
You can then set the *Credential* parameter to the **PSCredential** object.
252
+
You can then set the _Credential_ parameter to the **PSCredential** object.
240
253
241
254
If the acting credentials do not have directory-level permission to perform the task, Active Directory module for Windows PowerShell returns a terminating error.
Specifies a query string that retrieves Active Directory objects.
257
271
This string uses the Windows PowerShell Expression Language syntax.
258
-
The Windows PowerShell Expression Language syntax provides rich type-conversion support for value types received by the *Filter* parameter.
272
+
The Windows PowerShell Expression Language syntax provides rich type-conversion support for value types received by the _Filter_ parameter.
259
273
The syntax uses an in-order representation, which means that the operator is placed between the operand and the value.
260
-
For more information about the *Filter* parameter, type `Get-Help` [about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
274
+
For more information about the _Filter_ parameter, type `Get-Help` [about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
261
275
262
276
Syntax:
263
277
@@ -281,10 +295,9 @@ The following syntax uses Backus-Naur form to show how to use the Windows PowerS
281
295
282
296
For a list of supported types for \<value\>, type `Get-Help about_ActiveDirectory_ObjectModel`.
283
297
284
-
Note: Windows PowerShell wildcards other than \*, such as ?, are not supported by the *Filter* syntax.
285
-
286
-
Note: To query using LDAP query strings, use the *LDAPFilter* parameter.
298
+
Note: Windows PowerShell wildcards other than \*, such as ?, are not supported by the _Filter_ syntax.
287
299
300
+
Note: To query using LDAP query strings, use the _LDAPFilter_ parameter.
Specifies an LDAP query string that is used to filter Active Directory objects.
331
346
You can use this parameter to run your existing LDAP queries.
332
-
The *Filter* parameter syntax supports the same functionality as the LDAP syntax.
333
-
For more information, see the *Filter* parameter description or type `Get-Help` [about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
347
+
The _Filter_ parameter syntax supports the same functionality as the LDAP syntax.
348
+
For more information, see the _Filter_ parameter description or type `Get-Help` [about_ActiveDirectory_Filter](/previous-versions/windows/server/hh531527(v=ws.10)).
Specifies the distinguished name of an Active Directory partition.
349
365
The distinguished name must be one of the naming contexts on the current directory server.
350
-
The cmdlet searches this partition to find the object defined by the *Identity* parameter.
366
+
The cmdlet searches this partition to find the object defined by the _Identity_ parameter.
351
367
352
-
In many cases, a default value is used for the *Partition* parameter if no value is specified.
368
+
In many cases, a default value is used for the _Partition_ parameter if no value is specified.
353
369
The rules for determining the default value are given below.
354
370
Note that rules listed first are evaluated first and once a default value can be determined, no further rules are evaluated.
355
371
356
-
In Active Directory Domain Services environments, a default value for *Partition* is set in the following cases:
372
+
In Active Directory Domain Services environments, a default value for _Partition_ is set in the following cases:
357
373
358
-
- If the *Identity* parameter is set to a distinguished name, the default value of *Partition* is automatically generated from this distinguished name.
359
-
- If running cmdlets from an Active Directory provider drive, the default value of *Partition* is automatically generated from the current path in the drive.
360
-
- If none of the previous cases apply, the default value of *Partition* is set to the default partition or naming context of the target domain.
374
+
- If the _Identity_ parameter is set to a distinguished name, the default value of _Partition_ is automatically generated from this distinguished name.
375
+
- If running cmdlets from an Active Directory provider drive, the default value of _Partition_ is automatically generated from the current path in the drive.
376
+
- If none of the previous cases apply, the default value of _Partition_ is set to the default partition or naming context of the target domain.
361
377
362
-
In Active Directory Lightweight Directory Services (AD LDS) environments, a default value for *Partition* is set in the following cases:
378
+
In Active Directory Lightweight Directory Services (AD LDS) environments, a default value for _Partition_ is set in the following cases:
363
379
364
-
- If the *Identity* parameter is set to a distinguished name, the default value of *Partition* is automatically generated from this distinguished name.
365
-
- If running cmdlets from an Active Directory provider drive, the default value of *Partition* is automatically generated from the current path in the drive.
366
-
- If the target AD LDS instance has a default naming context, the default value of *Partition* is set to the default naming context.
367
-
To specify a default naming context for an AD LDS environment, set the **msDS-defaultNamingContext** property of the Active Directory directory service agent (DSA) object (**nTDSDSA**) for the AD LDS instance.
368
-
- If none of the previous cases apply, the *Partition* parameter will not take any default value.
380
+
- If the _Identity_ parameter is set to a distinguished name, the default value of _Partition_ is automatically generated from this distinguished name.
381
+
- If running cmdlets from an Active Directory provider drive, the default value of _Partition_ is automatically generated from the current path in the drive.
382
+
- If the target AD LDS instance has a default naming context, the default value of _Partition_ is set to the default naming context.
383
+
To specify a default naming context for an AD LDS environment, set the **msDS-defaultNamingContext** property of the Active Directory directory service agent (DSA) object (**nTDSDSA**) for the AD LDS instance.
384
+
- If none of the previous cases apply, the _Partition_ parameter will not take any default value.
Specifies an Active Directory path to search under.
444
464
445
465
When you run a cmdlet from an Active Directory provider drive, the default value of this parameter is the current path of the drive.
@@ -449,8 +469,8 @@ When you run a cmdlet outside of an Active Directory provider drive against an A
449
469
When you run a cmdlet outside of an Active Directory provider drive against an AD LDS target, the default value is the default naming context of the target AD LDS instance if one has been specified by setting the **msDS-defaultNamingContext** property of the Active Directory directory service agent object (**nTDSDSA**) for the AD LDS instance.
450
470
If no default naming context has been specified for the target AD LDS instance, then this parameter has no default value.
451
471
452
-
When the value of the *SearchBase* parameter is set to an empty string and you are connected to a global catalog port, all partitions are searched.
453
-
If the value of the *SearchBase* parameter is set to an empty string and you are not connected to a global catalog port, an error is thrown.
472
+
When the value of the _SearchBase_ parameter is set to an empty string and you are connected to a global catalog port, all partitions are searched.
473
+
If the value of the _SearchBase_ parameter is set to an empty string and you are not connected to a global catalog port, an error is thrown.
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.
494
516
The service may be any of the following: Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory snapshot instance.
495
517
496
-
Specify the Active Directory Domain Services instance in one of the following ways:
518
+
Specify the Active Directory Domain Services instance in one of the following ways:
497
519
498
520
Domain name values:
499
521
500
522
- Fully qualified domain name
501
523
- NetBIOS name
502
524
503
-
Directory server values:
525
+
Directory server values:
504
526
505
527
- Fully qualified directory server name
506
528
- NetBIOS name
507
529
- Fully qualified directory server name and port
508
530
509
531
The default value for this parameter is determined by one of the following methods in the order that they are listed:
510
532
511
-
- By using the *Server* value from objects passed through the pipeline
533
+
- By using the _Server_ value from objects passed through the pipeline
512
534
- By using the server information associated with the Active Directory Domain Services Windows PowerShell provider drive, when the cmdlet runs in that drive
513
535
- By using the domain of the computer running Windows PowerShell
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).
529
552
530
553
## INPUTS
531
554
532
555
### None or Microsoft.ActiveDirectory.Management.ADComputer
533
-
A computer object is received by the *Identity* parameter.
556
+
557
+
A computer object is received by the _Identity_ parameter.
This Get-ADComputer cmdlet returns a default set of **ADComputer** property values.
541
-
To retrieve additional **ADComputer** properties, use the *Properties* parameter of this cmdlet.
566
+
To retrieve additional **ADComputer** properties, use the _Properties_ parameter of this cmdlet.
542
567
543
568
To view the properties for an **ADComputer** object, see the following examples.
544
569
To run these examples, replace \<computer\> with a computer identifier such as the SAM account name of your local computer.
@@ -552,7 +577,8 @@ To get a list of all the properties of an ADComputer object, use the following c
552
577
`Get-ADComputer`\<computer\>`-Properties ALL | Get-Member`
553
578
554
579
## NOTES
555
-
* This cmdlet does not work with AD LDS with its default schema. By default AD LDS schema does not have a computer class, but if the schema is extended to include it, this cmdlet will work with LDS.
580
+
581
+
- This cmdlet does not work with AD LDS with its default schema. By default AD LDS schema does not have a computer class, but if the schema is extended to include it, this cmdlet will work with LDS.
0 commit comments