write a script to get users desktop and documents size, and run the script as sccm package
All,
I need to run Hardware Inventory to get users desktop and documents size. I like to run the batch file as a package to a large number of win7 laptops. If anyone has any knowledge, this subject, please help me out.
We are planning to refresh,and move users desktop and documents to our Network drive, before we do that need to know how much space we need. if you need more information, please let me know.
Thank you in advance .
2 Comments
[ + ] Show comments
-
I was thinking some ITNINJA will answer my question, but i think its a new to them as well. - Litonmc 6 years ago
-
I don't know much about SCCM, but a quick Google search of "windows script folder size" comes up with a bunch of options for getting this done through batch scripts or PowerShell commands. Have you tried any of those? - JasonEgg 6 years ago
Answers (1)
Please log in to answer
Posted by:
nagendrasingh
6 years ago
You can try this or any such file.
This one is from https://superuser.com/questions/837016/how-can-i-check-the-size-of-a-folder-from-the-windows-command-line
$totalsize=[long]0;gci -File -r -fo -ea Silent|%{$totalsize+=$_.Length};$totalsize
You can see the result of running this file in C:\Users\nasingh\Desktop\rental folder below
PS C:\Users\nasingh\Desktop\rental> $totalsize=[long]0;gci -File -r -fo -ea Silent|%{$totalsize+=$_.Length};$totalsize
60766869
You can append the results on a file on a remote share. Or you can generate individual text files and later merge them. Some data manipulation with MS Excel would put it in a single .xlsx file.
This one is from https://superuser.com/questions/837016/how-can-i-check-the-size-of-a-folder-from-the-windows-command-line
$totalsize=[long]0;gci -File -r -fo -ea Silent|%{$totalsize+=$_.Length};$totalsize
You can see the result of running this file in C:\Users\nasingh\Desktop\rental folder below
PS C:\Users\nasingh\Desktop\rental> $totalsize=[long]0;gci -File -r -fo -ea Silent|%{$totalsize+=$_.Length};$totalsize
60766869
You can append the results on a file on a remote share. Or you can generate individual text files and later merge them. Some data manipulation with MS Excel would put it in a single .xlsx file.