/build/static/layout/Breadcrumb_cap_w.png

KACE Custom Inventory Rule to search all local drives.

Hi,


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)


Thanks


Tony


0 Comments   [ + ] Show comments

Answers (1)

Posted by: flip1001 5 years ago
Black Belt
0
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:

Share

 
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