Avatar of mobot
mobot
Flag for United States of America asked on

List Windows Shares from the cmd line?

I'm asking for the cmd that will list the share name and the folder path and the description?

I've used 'net view \\servername' and it kicks out the Share name and Type.  I need the folder path and the description too.

Windows Server 2003 SP2
Windows NetworkingWindows OSWindows Server 2003

Avatar of undefined
Last Comment
mobot

8/22/2022 - Mon
John

Try NET USE (no parameters). That gives me what I need.
Bryant Schaper

Invoke-Command -ComputerName xxxxx -ScriptBlock { gwmi -q "SELECT * FROM Win32_Share WHERE
 Name != 'ADMIN$' AND Name != 'IPC$'" }"

sub computername at xxxx

But I used powershell, not sure if it will work for you.
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Raheman M. Abdul

You can get from powershell:
Open Powershell cmd by  Start -> Run -> Powershell
Then in powershell window type:
 Get-WmiObject -Class win32_share

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
NVIT

You can either
... at the server: net share which shows the shares for that server

... at the client: rmtshare \\servername
Here's one link you can get rmtshare at: Windows 2000 Resource Kit
Mike T

Hi,

There are many ways to do this. I like the GUI method: type fsmgmt.msc from run or command shell.
All other methods have already been mentioned above :).

Mike
mobot

ASKER
This is what worked for me.  Sorry for the delay in getting back to everyone.  And thanks to all for your suggestions.

wmic.exe path win32_share get Caption,Name,Path
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.