Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

Scan all the machines in a file if they can access all drives

Hi,

I have a file with machine names.Need to find if the domain administrator can log in to all the drives in the file and give results to a file.

Machine name   C$ accessable   D$ accessable   E$ accessable.

Regards
Sharath
Avatar of Alan Huseyin Kayahan
Alan Huseyin Kayahan
Flag of Sweden image

     Hi Sharath
           Administrative shares can not be partition specific, if  it is enabled, all partitions $ share will be enabled.
           for /f %x in (c:\computers.txt)  do reg query "\\%x\HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters" /v AutoShareWks  >>C:\computers.txt
            1 values means Accessible, 0 means Not Accessible

Regards
There is a little program called Netshare. It is on the SysInternals web page from Microsoft. This utility will help you look at all your shares on the LAN and can tell you who has permissions to those files, if I am not mistaken.
Avatar of bsharath

ASKER

I get this...

C:\>reg query "\\dev-chen-mrd100\HKLM\SYSTEM\CurrentControlSet\Services\LanManSe
rver\Parameters" /v AutoShareWks   1>>C:\computers.txt
ERROR: The system was unable to find the specified registry key or value.
   Hi Sharath
            Above is for XP clients. For server OS (server 2003 etc), you should do the following.
             for /f %x in (c:\computers.txt)  do reg query "\\%x\HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters" /v AutoShareServer  >>C:\computers.txt

Regards
I get this

C:\>for /f %x in (c:\computers.txt)  do reg query "\\%x\HKLM\SYSTEM\CurrentContr
olSet\Services\LanManServer\Parameters" /v AutoShareServer  >>C:\computers.txt

C:\>reg query "\\dev-chen-mrd100\HKLM\SYSTEM\CurrentControlSet\Services\LanManSe
rver\Parameters" /v AutoShareServer   1>>C:\computers.txt
ERROR: The system was unable to find the specified registry key or value.
ASKER CERTIFIED SOLUTION
Avatar of Alan Huseyin Kayahan
Alan Huseyin Kayahan
Flag of Sweden image

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
I get this,.

C:\>for /f %x in (c:\computers.txt)  do reg query \\%x\HKLM\SYSTEM\CurrentContro
lSet\Services\LanManServer\Parameters /v AutoShareServer  >>C:\computers.txt

C:\>reg query \\dev-chen-mrd100\HKLM\SYSTEM\CurrentControlSet\Services\LanManSer
ver\Parameters /v AutoShareServer   1>>C:\computers.txt
ERROR: The system was unable to find the specified registry key or value.

C:\>reg query \\indiasophos\HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\
Parameters /v AutoShareServer   1>>C:\computers.txt
ERROR: The system was unable to find the specified registry key or value.


I have tried in 5 syatems
Any help....
Any help...