I was wondering if someone could help me with a particular issue I’m having, can’t seem to work this out.
So i have a share on a SAN, lets say the share at the top level is ‘\Share01’ and that share contains lots of projects for example the structure might be like this
There is no parent folder thats the issue… Its directly to \SHARE01 and you can go to that on the GUI
however you cannot map to it and i can’t get to directly on command line either…
So its a matter of… go to '\SHARE01\Project_ [whatever is first here anything starting with A, lets say - grab that share and bring back permissions then go to next share]
There is a lot of folders in here… the alternative way is for me to export that list into a CSV file and then cycle through them… but i can’t seem to get to it on command line so thats out of the question also.
Try to see if your SAN vendor has a Powershell module. If you can get one, look for a cmdlet that you can use to enumerate the shares. Once you’ve got that, you’re golden.
If it’s a NAS with a CIF server, you may be able to access it with an admin share (e.g. \server\h$.…). Another possibility is DFS is you have available and some kind of logical structure (“\domain\projects\project1” = target “server\project1”) and WMI (Win32_DFSTarget) can enumerate the target path. I’ve tried a couple iterations trying to connect to even a Windows-based UNC and nothing is enumerated, but Windows I can use Win32_Share to enumerate and get a UNC path.
Since it’s a non-Windows storage device, I doubt there are any easy ways of showing a list of shares.
The easiest solution would be to create a new share on the parent folder and giving only a service account read access to that.
Alternatively you can browse through manuals and documentation to see if your device supports any kind of WMI/CIM remote management. Or perhaps contacting the vendor would be faster.
Now if it was a Windows server hosting the shares then things would be a lot easier.
Have you tried “net view \share01” ? It’s an old way of displaying shared folders, printers, etc on an SMB endpoint. You’d have to do some string parsing to pull out the share names, but it might work.