samiam41
asked on
powershell command to get directory size of remote pc of files over x mb
Hi Experts. I am getting more familar with powershell and the more I use/test with it, the more I like it. Since there is a computer in our environment that is showing it has less than 25% disk space left (thanks SpiceWorks for the warning), I would like to use powershell to run a quick audit to tell me what file(s) may be blowing up.
I ran dir \\pc\c$ -r and the list of files and their sizes just kept going and going. Would one of you that know what switch I am missing kindly tell me how to filter out file sizes that are less than 10mb or are over 10mb (which ever is easier), please?
Your help is greatly appreciated. Thanks!
I ran dir \\pc\c$ -r and the list of files and their sizes just kept going and going. Would one of you that know what switch I am missing kindly tell me how to filter out file sizes that are less than 10mb or are over 10mb (which ever is easier), please?
Your help is greatly appreciated. Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Smart man! There is so much to learn. Thanks for finding it. Testing it now.
ASKER
Outstanding!
It would be great to work with you again. BTW, where is the best place/site to learn Powershell? I'm hitting up the technet site but wanted to ask if you knew of other good sites.
Thanks again
It would be great to work with you again. BTW, where is the best place/site to learn Powershell? I'm hitting up the technet site but wanted to ask if you knew of other good sites.
Thanks again
There are so many....
Best thing to do is Google Powershell and whatever you are trying to do.
Thanks for the grade, and I look forward to working with you again!
Best thing to do is Google Powershell and whatever you are trying to do.
Thanks for the grade, and I look forward to working with you again!
It will take a while as it reads every file, but when it is done it will only show you the largest 20 files. You can change the 20 to whatever you want.
Open in new window