KACE Report to show size of particular folder
I am looking to make a report that will show a particular folder's size. I would be running this on a group of workstations and my goal is to see if how big this folder is for each user. I am not sure if this is possible but I would love some feedback on this.
All Answers
Custom Inventory Rules are your friend:
1. create the CIR of your choice under Inventory|Software|New
ShellCommandTextReturn(powershell -command "$fso = new-object -com Scripting.FileSystemObject; gci -Directory c:\users\| select @{l='Size'; e={$fso.GetFolder($_.FullName).Size}},FullName | sort Size -Descending | ft @{l='Size [MB]'; e={'{0:N2} ' -f ($_.Size / 1MB)}},FullName") (or whatever you use to get the nessesary info via CLI, this will show all user directories on a machine)
2. create a Report using this CIR.
You are done.
-
Thank you for your feedback. I don't know if I understand this fully though. I made the CIR with your command but how do I go about using that to get info from devices? I am just a bit unsure on the reporting part of this.
-
-
As stated before:
You _CREATE_ a new Software Item, which is only used for the CustomInventoryRule.
In already detected Software Items you are unable to modify the CIR.
In this _NEWLY_CREATED_ SoftwareItem you enter the CIR to run the script or the test against a Registry Key or whatever.
In our example it is a shiny little one liner (which you can modify to get what you want, feel free)
Add all OS to this _NEWLY_CREATED_ SoftwareItem you want to run it to.
Save it and let the appliance do the work during the check ins.
You can find the info under Inventory|Devices| Software |Custom Inventory Fields.
As soon as it is there it is also in the DB so a report against the CIR will show results.
If you need someone to do all this for you, KACE Professional Services would be your first contact.
-
Comments