C.2 Grooming GPOs by Version Stored Procedure

You can execute the fa_rep_groomRepositorybyVersion stored procedure to groom GPOs based on version number. Grooming based on a version number grooms all GPOs with a version lower than you specify. You can also limit the criteria to a specific GPO or to all GPOs within a specific domain.

For more information about executing stored procedures, see Section C.1, Executing the Grooming SQL Server Stored Procedures.

NOTE:If you specify a version higher than the latest GPO version, then GPA grooms all but the latest GPO version.

C.2.1 Syntax

exec fa_rep_groomRepositorybyVersion '{GPO_GUID}','version','domain' 

C.2.2 Parameters

Specify the following parameters.

GPO_GUID

GUID of the GPO. Specify the GUID to groom only GPOs with the same GUID in the specified domain. If you want to groom all GPOs within the specified domain, regardless of GUID, type null. Note: If you specify the GUID, you must also specify the domain.

domain

Name of the domain that contains the GPO. Specify the domain name to groom only GPOs within the same domain. If you want to groom GPOs within all domains, type null. Use a fully qualified domain name (FQDN) format (domain.com).

version

Version of the GPO. The stored procedure grooms all GPOs lower than the version you specify that match the GUID and domain or domain, if specified.

C.2.3 Examples

Grooming versions lower than 7 of a specific GPO within a domain named MyDomain.com:

exec fa_rep_groomRepositorybyVersion '{40addbf7-9d0e-412a-9507-3e381fb5c707}','7','MyDomain.com' 

Grooming versions lower than 7 of all GPOs within a domain named MyDomain.com:

exec fa_rep_groomRepositorybyVersion null,'7','MyDomain.com' 

Grooming versions lower than 7 of all GPOs within all domains:

exec fa_rep_groomRepositorybyVersion null,'7',null