/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


write a script to get users desktop and documents size, and run the script as sccm package

02/28/2018 638 views
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

Comments

  • I was thinking some ITNINJA will answer my question, but i think its a new to them as well.
  • 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?

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
0
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.

Answered 03/18/2018 by: nagendrasingh
Black Belt

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