Retrieve all computer objects in a domain or container that match the specified conditions.

      Get-QADComputer [[-Identity] IdentityParameter] [-ComputerRole ComputerRole] 
          ADProperties DateTimeOptions Membership Advanced_Options
             [-Tombstone]  [-SizeLimit Int32] [-LdapFilter String]  
                [-IncludeAllProperties] [-SerializeValues]   

   -identity    The Distinguished Name (DN), Canonical Name, GUID or, where applicable,
                the Domain\Name, UPN or SID of the object you wish to find. 

   ADProperties Retrieve objects that match one or more of the properties below:
                [-Description String] [-DisplayName String]
                [-SamAccountName String] [-DnsName String] 
                [-Location String] [-ManagedBy IdentityParameter]
                [-OSName String] [-OSVersion String] [-OSServicePack String] 
                [-Anr String]  (ambiguous name resolution)

                Only return items matching a date range:
                [-CreatedOn DateTime] [-CreatedAfter DateTime] [-CreatedBefore DateTime]
                [-LastChangedOn DateTime] [-LastChangedAfter DateTime] [-LastChangedBefore DateTime]

                Only return items that belong (or don't belong) to given groups:
                [-MemberOf IdentityParameter[]] [-IndirectMemberOf IdentityParameter[]] 
                [-NotMemberOf IdentityParameter[]] [-NotIndirectMemberOf IdentityParameter[]]

   -SizeLimit   Maximum number of items to be returned (default=1000) 

   -LdapFilter  A case-sensitive LDAP search filter.
                If an Identity value is supplied this parameter will be ignored.

                Retrieve all attributes of the computer object

                Output the object properties as a string (serialized) this makes it easy to
                export attribute values to a text file. When used with -IncludeAllProperties,
                an entire object can be exported from AD into a text file.

                [-LastKnownParent IdentityParameter] [-SecurityMask SecurityMasks]
                [-SearchRoot IdentityParameter] [-SearchScope SearchScope]
                [-AttributeScopeQuery String] [-PageSize Int32]  
                [-WildcardMode WildcardMode] [-ObjectAttributes Object]  [-Anr String]  
                [-DontConvertValuesToFriendlyRepresentation] [-ReturnPropertyNamesOnly]  
                [-UseDefaultExcludedProperties] [-DontUseDefaultIncludedProperties]  
                [-UseDefaultExcludedPropertiesExcept String []] [-ExcludedProperties String[]]
                [-IncludedProperties String[]] [-UseGlobalCatalog] 
                [-Proxy] [-Service String]
                [-ConnectionAccount String] [-ConnectionPassword SecureString]
                [-Credential PSCredential] [-Connection ArsConnection]

By default Get-QADComputer will connect to any available domain controller with the credentials of the locally logged on user, to connect to a specific domain controller using a specific account, either use the advanced options (-Proxy/-Service/-ConnectionAccount) or use the Connect-QADService cmdlet to make the connection.


Connect to a computer on the domain SS64Dom

PS C:> get-QADComputer 'SS64Dom\MyServer$'

Within a specific OU, find all computers that run a particular version (canonical name) of the operating system, and list their names:

PS C:> get-QADComputer -SearchRoot '' -OSName '*Vista*'

List all domain controllers:

PS C:> get-QADComputer -computerRole 'DomainController'

Use an LDAP search filter to search for computers in a specific OU container. Display the name and DN of each computer found:

PS C:> get-QADComputer -SearchRoot '' -LdapFilter '(description=a*)'

Search to find all computers with an empty description, set a description for each one found:

C:\PS> get-QADComputer -SearchRoot '' -description '' | set-QADObject -description 'ACME Corporation PC'

“The machine does not isolate man from the great problems of nature but plunges him more deeply into them” ~ Antoine de Saint-Exupery


Quest cmdlets
Remove-QADObject - Delete object(s) from Active Directory

Copyright © 1999-2017
Some rights reserved