IGPMSearchCriteria::Add method (gpmgmt.h)

Adds a criterion for search operations.

Syntax

HRESULT Add(
  [in] GPMSearchProperty  searchProperty,
  [in] GPMSearchOperation searchOperation,
  [in] VARIANT            varValue
);

Parameters

[in] searchProperty

The search property to evaluate. For a valid combination of search properties, search operations, and values, see the Remarks section.

[in] searchOperation

The operation to use to evaluate searchProperty using the value specified by varValue.

[in] varValue

The value to evaluate searchProperty against.

Return value

JScript

Returns S_OK if successful. Returns a failure code if an error occurs.

VB

Returns S_OK if successful. Returns a failure code if an error occurs.

Remarks

Following is a table that contains the valid combinations for the searchProperty, searchOperation, and varValue parameters.

Note  Multiple calls to IGPMSearchCriteria::Add will result in a logical And operation of search criteria. This call does not support the Or logical operation functionality. Also, you can perform a Not of an individual criteria, but cannot perform a Not of a search result.
 
Search Property Search Operator Value
gpoPermissions opContains

opNotContains

GPMPermission
gpoEffectivePermissions opContains

opNotContains

GPMPermission
gpoID opEquals

opNotEquals

GUID
somLinks opContains GPMGPO
gpoDomain opEquals GPMDomain
backupMostRecent opEquals TRUE
gpoWMIFilter opEquals GPMWMIFilter
backupDomain opEquals String containing the domain name
gpoComputerExtensions opContains

opNotContains

GUID
gpoUserExtensions opContains

opNotContains

GUID
gpoDisplayName opEquals

opContains

opNotContains

User-friendly GPO display name.
starterGPOPermissions opContains

opNotContains

GPMPermission
starterGPOEffectivePermissions opContains

opNotContains

GPMPermission
starterGPODisplayName opEquals

opContains

opNotContains

User-friendly Starter GPO display name.
starterGPOID opEquals

opNotEquals

GUID
starterGPODomain opEquals GPMDomain

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll
Redistributable GPMC on Windows Vista

See also

IGPM

IGPMDomain

IGPMSearchCriteria