Yes. Generally, we believe that sampling in a typical drug manufacturing facility warehouse would not represent a risk to the container/closure or affect the integrity of the sample results. But whether the act of collecting a sample in the warehouse violates the CGMPs requirement that containers "be opened, sampled, and sealed in a manner designed to prevent contamination of their contents..." will depend on the purported quality characteristics of the material under sample and the warehouse environment. For container/closures purporting to be sterile or depyrogenated, sampling should be under conditions equivalent to the purported quality of the material: a warehouse environment would not suffice (see 211.94 and 211.113(b)). This is to preserve the fitness for use of the remaining container/closures as well as ensure sample integrity, if they are to be examined for microbial contamination. At a minimum, any sampling should be performed in a manner to limit exposure to the environment during and after the time samples are removed (i.e., wiping outside surfaces, limiting time that the original package is open, and properly resealing original package). Well-written and followed procedures are the critical elements.
Note that the CGMPs at 211.84 permit a manufacturer to release for use a shipment of containers/closures based on the supplier's certificate of analysis and a visual identification of the containers/closures. Once a supplier's reliability has been established by validation of their test results, a manufacturer could perform the visual examination entirely in the warehouse.