Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to Search a Server for all Network Shares and their total size - Powershell Script

$
0
0
Hi Guys,

I've been struggling with this for a few days now,

I can take in a list of servers from a text file and script will go off and find all the shares on that particular server  (see code below)

get-content C:\serverlist.txt
foreach-object {get-wmiobject Win32_share Path}

What I wanted to know is how to take this a step further so as well as finding all the shares on a server it will also tell me how large (MB or GB) that particular share is.

Any help or pointers would be great appreciated.

Cheers ;-)

Viewing all articles
Browse latest Browse all 15028

Trending Articles