Link to home
Start Free TrialLog in
Avatar of creative555
creative555

asked on

script to get the sizes of shares on the file server and export it to csv

Hello,
Could you please help with the script that would get the sizes for the shares and export it to csv with columns share name - size.

Thank you so much!
Avatar of Kanti Prasad
Kanti Prasad

Hi

Get-WmiObject -class -Win32_Share -computername MyFile -filter "Type=0" | Export-Csv c:\scripts\FileShare.txt
Avatar of creative555

ASKER

hi,
I tried the above but it didn't export the sizes for the shares. I got the share name but not the size. Thank you.
SOLUTION
Avatar of Kanti Prasad
Kanti Prasad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hm. It tells me that get-sharesize is not recognized command
Avatar of Bill Prew
You will need to run that at a Powershell command prompt.

~bp
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much!
Welcome.

~bp