You can use the ExecuteQuery command to create a persistent input file of objects to process in another pmrep command. For example, you want to export all logically deleted objects from the repository. You might create a query called find_deleted_objects. When you run the query with pmrep, as shown here, it finds all the deleted objects in the repository and outputs the results to a persistent input file:
ExecuteQuery -q find_deleted_objects -t private -u deletes_workfile
You can then use deletes_workfile as the persistent input file to ObjectExport:
ObjectExport -i deletes_workfile -u exported_del_file
ObjectExport exports all the referenced objects to an XML file called exported_del_file.