Retrieve all shares on a server programmatically?

dmoonme

New member
Joined
Jul 8, 2004
Messages
4
Programming Experience
1-3
I have 50 shares on a server

\\server\share1
\\server\share2
...
\\server\share50

I could statically add the names of each 50 shares to run on my script but that would take forever. Plus I have 10+ servers I need to run this script on..
Is there a way to retrieve all shares on a server dynamically/programmatically?

Here's what I have so far:
VB.NET:
Dim names as ArrayList names = New ArrayList() 
names.add([url="file:///crwfs1Data1"][color=#000020]\\crwfs1\Data1[/color][/url]) 'manually entered 
names.add([url="file:///crwfs1CMSOPEN"][color=#000020]\\crwfs1\CMSOPEN[/color][/url]) 
names.add([url="file:///crwfs1Correspondence"][color=#000020]\\crwfs1\Correspondence[/color][/url]) 
names.add([url="file:///crwfs1Data"][color=#000020]\\crwfs1\Data[/color][/url]) 
 
Dim strItem as String 
 
For Each strItem In names 
ListDirs(strItem) 
Next
 
Top Bottom