If I have a Windows server (typically 2000, 2003 or 2008), is there a simple way to list all local directories shared on that server?
I can find the shares themselves easily enough, but I would love a quick way to find the local directories they represent on disk.
Thanks!
You can go into computer management (right click my computer, select manage), expand the Shared Folders node and see a list of all shares, connected sessions and open files.
For W2K8, you do this in Server Manager instead: Roles -> File Services -> Share and Storage Management; the Shares tab in the center of the window.
For listing shares of remote servers, note that NET VIEW svr_name will only show user shares, no admin or hidden shares. Adding the /all switch at the end will show these others (for W2K8).
From a command line prompt, you can use the "net share" command. It will print a table with the list of the share name, the resource and an optional remark.
net share
from a command prompt will give you the share name and path. If you need something more advanced, you could query WMI using VBScript or PowerShell.Use WMI: Win32_Share.
In PowerShell:
This also includes the system provided shares and will work remotely.
THe resulting object's Path property is the local path.
For some clarity (as it's not obvious where to find the list of shares in the GUI)
As people mentioned, open a command prompt and type net share. This is probably the easiest way to see what shares are available. This will also show hidden shares (those with $ as the suffix) and where the share points to.
Here's an example:
On Windows Server 2008 either right click on Computer in the Start menu and select Manage, or launch the Server Manager (by default, the first icon next to the start menu in the task bar).
In the Server Manager, expand the Roles node, then expand the File Services node. Click on Share and Storage Management. The display will show two tabs, Shares and Volumes. The Shares tab shows you the existing shares (same as the console output above). This interface does allow you to interact with the with the share like changing properties/permissions, stopping the share, or creating new ones.
Hope that helps.
For a quick-and-dirty list, from a command-prompt execute "NET SHARE". The only problem with this command is that it thoughtfully formats data into columns and potentially cuts off long paths.
You may be better served by doing at
with REGEDIT. You can export this as-desired.
Right click on your
My Computer
icon and chooseManage
.In the window that opens, look in the tree on the left for the icon labeled
Shared Folders
and expand it to find another icon labeledShares
. Click here and you should see a list of all current shares.Open a PowerShell instance, add this function, then run it:
\servername write the name of server on your computer in Run (window+R) then its show list of share folder give by serve
Hawraz Abdulla