KACE Custom Inventory Rule to search all local drives.


I need a rule that can search all local drives for Drupal.  I'm using the following rule to search the C: drive, but just realized there are other servers in the company that have Drupal on the D or E drives.  Is there a way to run the rule on all local drives?

Below is what I'm currently using.

ShellCommandTextReturn(dir c:\drupal /s > %1 & type %1)



0 Comments   [ + ] Show comments

Answers (1)

Posted by: flip1001 2 years ago
Black Belt
It might be easier to do this in Powershell

(gwmi -query 'select deviceID from win32_logicaldisk where drivetype=3').deviceID | % {gci $_\drupal -recurse -erroraction silentlycontinue}

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ