GPDomain.SearchGpos Method (GPSearchCriteria)
Queries the domain for Group Policy objects (GPOs) that match a set of search criteria.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public GpoCollection SearchGpos(
GPSearchCriteria searchCriteria
)
public:
GpoCollection^ SearchGpos(
GPSearchCriteria^ searchCriteria
)
member SearchGpos :
searchCriteria:GPSearchCriteria -> GpoCollection
Public Function SearchGpos (
searchCriteria As GPSearchCriteria
) As GpoCollection
Parameters
searchCriteria
Type: Microsoft.GroupPolicy.GPSearchCriteriaA GPSearchCriteria object that contains the search criteria for the query.
Return Value
Type: Microsoft.GroupPolicy.GpoCollection
Returns GpoCollection. The GPOs that match the search criteria.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | searchCriteria is null. |
Remarks
The following table contains information about the search criteria you can specify for this method:
Search Property |
Meaning |
---|---|
Search for GPOs that have a display name that matches the specified search criteria. The search property value is all or part of the display name. The permitted operators are: Equals, Contains, and NotContains. |
|
Search for GPOs that have permissions that match the specified search criteria. The search property value is a GPPermission object. The permitted operators are: Contains and NotContains. |
|
Search for GPOs that have permissions or inherited permissions that match the specified search criteria. The search property value is a GPPermission object. The permitted operators are: Contains and NotContains. |
|
Search for GPOs that have an ID (GUID) that matches the specified search criteria. The search property value is the GUID. The permitted operators are: Equals and NotEquals. |
|
Search for GPOs that have WMI filters that have an ID (GUID) that matches the specified search criteria. The search property value is the GUID. The permitted operators are: Equals and NotEquals. |
|
GPOs that have a computer extension that matches the specified search criteria. The search property value is the GUID of the client-side extension. The permitted operators are: Contains and NotContains. |
|
GPOs that have a user extension that matches the specified search criteria. The search property value is the GUID of the client-side extension. The permitted operators are: Contains and NotContains. |
See Also
SearchGpos Overload
GPDomain Class
Microsoft.GroupPolicy Namespace
Return to top