New-LdapQueryDiscoveryCriteria

New-LdapQueryDiscoveryCriteria

Creates a new LdapQueryDiscoveryCriteria object used to discover computers.

Syntax

Parameter Set: FromLdapQueryDiscoveryCriteria
New-LdapQueryDiscoveryCriteria [-LdapQuery] <String> [-Domain] <String> [ <CommonParameters>]

Detailed Description

Creates a new LdapQueryDiscoveryCriteria object used to discover computers.

Parameters

-Domain<String>

Specifies the domain in which to apply the LDAP query.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-LdapQuery<String>

Specifies an LDAP query to use as discovery criteria. To learn more about LDAP queries, search for 'LDAP Query Basics' on Microsoft TechNet at https://www.microsoft.com/technet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Notes

  • For more information, type "Get-Help New-LdapQueryDiscoveryCriteria -detailed". For technical information, type "Get-Help New-LdapQueryDiscoveryCriteria -full".
    When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

Examples

-------------- EXAMPLE 1 --------------

This command creates an object that represents an LDAP query to run against the CONTOSO domain. The query specifies that the common name (cn) of the returned object should be FABRIKAM. You can think of the resulting object as a specification of the computer FABRIKAM within the CONTOSO domain that can be used as values to parameters in cmdlets like new-WindowsDiscoveryConfiguration.

C:\PS>$ldap_query = new-ldapquerydiscoverycriteria -domain contoso `
-ldapquery "(cn=fabrikam)"

New-WindowsDiscoveryConfiguration

Start-Discovery