Forum Discussion
1 Reply
- Mike_Moniz
Professor
It may be possible but sounds complex and I worry about how long it would take to collect that data. As far as I know, Windows doesn't provide a fast way to get the size of a folder, so you will need to recursively add up the size of all the files or use a 3rd party tool that does it for you. I can see that easily taking over the 2-minute (default) limit of script DataSources. And you generally want your DataSources to run as fast as possible to not bog down the scheduler. You may need to get fancy with perhaps a separate script that collects the data seperately and stores it where LM can get to it, or limit it to specific folders, etc.
Googling "wmi folder size" seems to show it's possible to do, but perhaps it would be faster to use something like psremote instead.