Can the k1000 calculate the number of .docx on managed hosts?
Hello,
I have been asked to calculate the number of Microsoft files (.docx etc) on all managed hosts. Is there a script I can run on the k1000 that will calculate this for me and transfer those results to a report. Thanks.
I have been asked to calculate the number of Microsoft files (.docx etc) on all managed hosts. Is there a script I can run on the k1000 that will calculate this for me and transfer those results to a report. Thanks.
1 Comment
[ + ] Show comment
-
Thank you very much. I will give this a try on a test machine. - jrbartes 10 years ago
Answers (1)
Please log in to answer
Posted by:
chucksteel
10 years ago
This command should return a count of files ending in .docx:
dir/s c:\*.docx | find /c "docx"
You can test this by opening a command prompt as administrator and running it. It will take a long time to run as it is searching the entire hard drive.
You can now create a custom inventory rule that using the ShellCommandTextReturn command with that command. Keep in mind that this will run every time your machines check in and will increase the time it takes for check ins to happen.
If you need to perform this same search on MacOS systems the command syntax would be different.