C.3 Grooming GPOs by Date Stored Procedure

You can execute the fa_rep_groomRepositorybyDate stored procedure to groom GPOs based on date. Grooming based on date enables you to groom all GPO versions with a modified date that is older than the date 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:Note If you specify a date that is more recent than the last modified date, then GPA grooms GPOs that are older than the last modified GPO.

C.3.1 Syntax

exec fa_rep_groomRepositorybyDate '{GPO_GUID}','modified date','domain' 

C.3.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).

modified date

Modified date of the GPO in the following format: yyyy-mm-dd. The stored procedure grooms all GPOs older than the date you specify that match the GUID and domain or domain, if specified.

C.3.3 Examples

Grooming all versions older than March 10, 2009, of a specific GPO within a domain named MyDomain.com

exec fa_rep_groomRepositorybyDate '{40addbf7-9d0e-412a-9507-3e381fb5c707}','2009-03-10','MyDomain.com' 

Grooming all versions older than March 10, 2009, of all GPOs within a domain named MyDomain.com

exec fa_rep_groomRepositorybyDate null,'2009-03-10','MyDomain.com' 

Grooming all versions older than March 10, 2009, of all GPOs within all domains

exec fa_rep_groomRepositorybyDate null,'2009-03-10',null