0

I'm trying to get a list of all "Volume Paths" for all shares on a remote NetApp server through PowerShell. WMI, CIM, WMIC, NET VIEW, NET SHARE, NET USE. I haven't been able to use any of those to get the path.

When looking at Computer Management > Shared Folders > Shares it lists all shared folders for that computer and their associated "Folder Path". It's almost exactly what I'm looking for. If Computer Management is able to retrieve that information then I should be able to replicate it using a coding/scripting language.

Just like "Local Users and Computers" in Comp Mgmt can be replicated using ADSI/ADSISearcher in .net framework. There has to be a way to replicate "Shares" in Comp Mgmt but I haven't been able to find anything that can do it. I've searched through some .net classes, the ones mentioned above, and google but have come up empty.

WMI, CIM, and WMIC give me "RPC Server is unavailable".

Does anyone have any ideas about what I could use to get retrieve the Volume path for shares that are on a remote NetApp File Server?

  • To clarify, can you confirm that you are able to open Computer Management > Shared Folders > Shares and see a list of shares hosted by the NetApp Fileserver? Can you give us the version of NetApp ONTAP ? – Swisstone Dec 19 '18 at 17:46
  • I am able to get into Comp Mgmt on the NetApps. I was able to pull the data from one of the netapps requested but i'd like to script it out if possible. I'm not on our storage team, so I don't have access to that info. – Kyle Hewitt Dec 19 '18 at 18:18
0

Try get-psdrive -psprovider "filesystem"

0

Try this:

 Get-WmiObject -Class Win32_Share

Similar post: Powershell - Get list of share folders

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.