New-CMGlobalConditionActiveDirectoryQuery

Creates a new Active Directory Query type global condition in Configuration Manager.

Syntax

New-CMGlobalConditionActiveDirectoryQuery
   -DataType <GlobalConditionDataType>
   -DistinguishedName <String>
   -LdapFilter <String>
   [-LdapPrefix <String>]
   -Property <String>
   -SearchScope <SearchScope>
   [-Description <String>]
   -Name <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The New-CMGlobalConditionActiveDirectoryQuery cmdlet creates a Active Directory Query type global condition in Configuration Manager.

A global condition is a setting or expression in Configuration Manager that you can use to specify how Configuration Manager provides and deploys an application to clients.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1

$GlobalQuery = New-CMGlobalConditionActiveDirectoryQuery -Name GC1 -DataType String -DistinguishedName "CN=Users" -LdapPrefix "LDAP://" -LdapFilter "DC=Vlan123DOM" -Property "DC=net" -SearchScope Base -Description $String

This command creates a new Active Directory Query type global condition in Configuration Manager.

Parameters

-DataType

Specifies a global condition data type.

Type:GlobalConditionDataType
Accepted values:String, DateTime, Integer, FloatingPoint, Version, Boolean, StringArray, IntegerArray
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DistinguishedName

Specifies a distinguished name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LdapFilter

Specifies a LDAP filter to refine the results from the Active Directory Domain Services query to assess compliance on client computers.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LdapPrefix

Specifies a valid LDAP prefix to the Active Directory Domain Services query to assess compliance on client computers. You can use either LDAP:// or GC://.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies a name for the Active Directory Query global condition.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Property

Specifies the property of the Active Directory Domain Services object that will be used to assess compliance on client computers.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SearchScope

Specifies the search scope in Active Directory Domain Services:

  • Base - Queries only the specified object.
  • One Level - This option is not used in this version of Configuration Manager.
  • Subtree - Queries the specified object and its complete subtree in the directory.
Type:SearchScope
Accepted values:Base, OneLevel, Subtree
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object