Avatar of samiam41
samiam41
Flag for United States of America asked on

PS script to find jpg's, mov's, other files in user network share

Greetings EE!  I am preparing to migrate our workstations from XP to 7 and part of the project's early stages is the file server clean-up which includes the network shares for our users.  With 250+ user folders, I figured this would be a good time to use Powershell for something besides tutorials and start using it in the real world.  Here is what I need to do:

1- Audit how much space (overall in the "users" directory) is being occupied by non-work related file types such as jpg's, music files, video's, etc.
2- Get the overall parent folder size for each user
3- Report of the file size in XLS

The network shares are under the \\fileserver\users directory (users is the name of the directory and share name).

Like I said above, I have been learning Powershell and this is my first non-training wheel, real-world script project.  It would have been great to start with something small but that isn't state gov for you.  Your help is appreciated.
PowershellWindows 7Windows Server 2003

Avatar of undefined
Last Comment
samiam41

8/22/2022 - Mon
SOLUTION
Delphineous Silverwing

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
strivoli

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Joseph Daly

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
samiam41

ASKER
Thanks everyone!  Trying out the MS solution, win-dir (forgot all about that gem!) and then filelist.  Updates forthcoming.
samiam41

ASKER
File server resource manager is only available on Windows 2003 R2/2008 R2.  The file server is Windows 2003.  Crap!  I installed FSRM on a 2008 R2 server as I really wanted to see it's benefits but it won't work for this assignment.  Thanks for bringing it up as I am sure it will be used going forward.

Win-dir still running.
Joseph Daly

Win dir will run for a good amount of time if it is a large share but the info it gives is well worth it. I just recently used this to help find and import PST files into our email archive. recovered about 800 gb worth of space.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
samiam41

ASKER
I can't believe the sizes of our user's PST files!  It's nuts and the worst part is some of the largest PST files belong to those users who haven't been here a year yet.  I love that a 200GB share is being mainly consumed by 10~ users and their MUSIC and personal PICTURE files.  Guess the state is their personal cloud storage, well, until today that is.

What are you using for PST management?
Joseph Daly

We are using emc source one for exchange.
samiam41

ASKER
Gotcha.  I guess I will have to start looking into solutions.

I can't export this win-dir result unless I configure a POP3 account on my Windows 2003 server.  Does this sound right?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
samiam41

ASKER
Used windir and then filelist.  Since we don't have a Windows 2003 R2 server, I couldn't utilize the FSRM on our existing server but we will be using our Windows 2008 R2 "eventually" as the file server and FSRM will be utilized then.  Thanks for bringing it up.

Thanks Experts!