Click to See Complete Forum and Search --> : hidden shares


moochoo
October 12th, 2004, 05:42 AM
is it possible through the dos prompt or a 3rd party tool to view hidden shares on remote machines on the LAN?

confus-ed
October 12th, 2004, 05:47 AM
Welcome to WD forums moochoo, "net share" will show you the ones you have permissions on. This shows the syntax for xp (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_share.mspx) as an example.

moochoo
October 12th, 2004, 06:01 AM
net share only shows my local hidden shares.

i would like to view the hidden shares of my remote computers

unless i am reading the syntax for net share wrong that is!

confus-ed
October 12th, 2004, 06:20 AM
net share only shows my local hidden shares.



Oh d'uh :rolleyes: - [begin shake head mode at self] confus-ed, didn't read it properly, my bad ! [/end]

But I seem to think we've had nearly this question before here Try this (View Domain Net Shares via DOS ) (http://forums.windrivers.com/showthread.php?t=55109&highlight=view+share) where I & others got a bit 'touchy' on motives, I should have said straight off - why not use management console ?

moochoo
October 12th, 2004, 06:29 AM
i wanted to do it at the command line for scripting purposes.

i shall have a look around see what i can find

CeeBee
October 12th, 2004, 08:15 AM
You can make a script that runs on the remote machines using the great PSEXEC (part of PSTools) from www.sysinternals.com
Then you can write a couple of batch files to run on the remote systems:

LISTSHARES.BAT
================
for /f %%i in (computerlist.txt) do psexec \\%%i -u YOURDOMAIN\Administrator -p AdminPassword -c remotescript.bat
================

REMOTESCRIPT.BAT
================
set log=\\yourserver\outputshare\output.txt
echo #### Listing shares for %computername% >>%log% ####
net share >>%log%
echo #### End of listing ####
================

Just dump the list of remote machines in computerlist.txt and create a share on a server that has access from the administrator account.
After you run listshares.bat, the output.txt file will have all the details you need.

moochoo
October 12th, 2004, 08:33 AM
thanks a lot thats perfect for my needs!