Questions

How to get share info from a list of servers?

+
0 Votes
Locked

How to get share info from a list of servers?

HP Gaspar
Recently I got asked the question how we could pull a listing of all the shares, share permissions and security permissions on a number of servers, the request was pretty simple executing it is extremely challenging. We have 900 servers and we need to know the share drive and path of these shares, share permissions and security permisssions. Short of logging into each server and taking a listing manually, we did iund RMTshare <<http://support.microsoft.com/default.aspx/kb/172599>> and used the below batch file to list the shares and share paths:

********************************************************************************************
@Echo off
Title Share Lister
Echo.Please wait
for /f "usebackq delims=" %%A in ("comp.txt") do (
ECHO #############################################
Echo %%A
RMTSHARE.exe \\%%A
)>>Share.csv
********************************************************************************************
Our problem is we need to also get the share and security permissions for the shares which we do not seem to be able to do.
Any ideas out there on how we could use RMTShare to do this or does anyone have a vbscript that we could use? Any help would be appreciated guys, we have a few thousand shares per server and it makes it rather difficualt to gather all the data manually.
+
0 Votes
HP Gaspar

@Echo off
Title Share Lister
Echo.Please wait
for /f "usebackq delims=" %%A in ("comp.txt") do (
ECHO #############################################
Echo %%A
RMTSHARE.exe \\%%A
)>>Share.csv

+
1 Votes
robo_dev

This is part of the Windows 2003 resource kit

It can enumerate shares and permissions on local and remote servers

+
0 Votes
HP Gaspar

Thank you Robo, as always the guys here come back quick with excellent answers. we are looking at a batch file or csharp dev to run either SRVcheck.exe or Shareenum.

+
1 Votes
markp24

hi

Agree with above , use a batch file or some type of script, but you can use
"ShareEnum" to get the permissions report (http://technet.microsoft.com/en-us/sysinternals/bb795532)
or in a powershell script using the get-acl command

+
0 Votes
HP Gaspar

Thank you . Appreciate the response. My Powershell Guru is off in a teepee somewhere doing his vision quest, we are looking at using csharp to to get the data using either ShareEnum or SRVCHECK.exe.
As always guys, thanks for the response and assistance.

+
0 Votes
markp24

Ahh i see, C sharp is beyond my area , but ims sure somoen on here will know how to help you with that.