Forum Discussion
tylerjohnson0526
Nov 08, 2021Copper Contributor
Using Get-ADComputer Syntax
Hello all, I am attempting to gain inventory on newly installed SSD drives in workstations. When I use "get-adcomputer" and use "-filter *" does this grab computers listed in all domain controlle...
AndySvints
Nov 08, 2021Iron Contributor
Hello tylerjohnson0526,
AFAIK it grabs the list of computers in Active Directory Forest (All DCs).
In your command you are not specifying SearchBase and Server parameters.
From the help & documentation of -SearchBase:
"the default value of this parameter is the default naming context of the target domain."
Help & documentation of -Server:
"The default value for this parameter is determined by one of the following methods in the order that they are listed:
- By using the Server value from objects passed through the pipeline
- By using the server information associated with the Active Directory Domain Services Windows PowerShell provider drive, when the cmdlet runs in that drive
- By using the domain of the computer running Windows PowerShell"
Hope that helps.