Link to home
Create AccountLog in
Avatar of Skiff-SS-N-23
Skiff-SS-N-23Flag for Kyrgyzstan

asked on

powershell script for monitoring folder content in file server (size, # of files, # of folder)

hello experts,

as i cannot effectively monitor my file server (windows server 2003 R2 SP1) i want to accomplish this task by the help of powershell script.

i need a script which will scan the file folder which contains folders of departments and subfolders.
output should be: folder list, number of folders, number of files and total size in MB/GB.

the only constraint is that there may be long folder names and many subfolders so they should also be scannable.

thanks
ASKER CERTIFIED SOLUTION
Avatar of Haresh Nikumbh
Haresh Nikumbh
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
you have 2 options:
1. create file folder watcher which triggers every time file is added to the folder/subfolder and then create the report you requires.
2. task scheduler which runs the script in predefined interval, which creates the report you requires.

which one u want?
Avatar of Skiff-SS-N-23

ASKER

thanks,
it worked out as i needed.