![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Trying to list non-Windows NAS network shares I posted this in the WMI discussion last week, but no responses yet. This looks like a more active group! I'm trying to list the network shares from an EMC Celerra NAS. I have noticed that when I run the computer Management MMC, I can connect to one of the NAS CIFS and get most of what I want/need. I assume this is using WMI to gather the info! Is that right? I found the following List Shares sample script: ------------------ strComputer = "public" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colShares = objWMIService.ExecQuery("Select * from Win32_Share") For each objShare in colShares Wscript.Echo "Allow Maximum: " & objShare.AllowMaximum Wscript.Echo "Caption: " & objShare.Caption Wscript.Echo "Maximum Allowed: " & objShare.MaximumAllowed Wscript.Echo "Name: " & objShare.Name Wscript.Echo "Path: " & objShare.Path Wscript.Echo "Type: " & objShare.Type Next -------------------- This does exactly what I want/need for Windows hosted shares. However, when I use a CIFS name defined on the NAS (e.g. "public" in the above code), I get this error message: List_shares.vbs(2, 1) Microsoft VBScript runtime error: The remote server machine does not exist or is unavailable: 'GetObject' How do I need to re-work this script to gather this non-Windows hosted NAS info? Thanks, Denny |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Trying to list non-Windows NAS network shares "DennyThury" <DennyThury@xxxxxx> wrote in message news:3A19CF8A-1A57-4BB2-8529-C178F0A8B419@xxxxxx Quote: >I posted this in the WMI discussion last week, but no responses yet. This > looks like a more active group! > > I'm trying to list the network shares from an EMC Celerra NAS. I have > noticed that when I run the computer Management MMC, I can connect to one > of > the NAS CIFS and get most of what I want/need. I assume this is using WMI > to > gather the info! Is that right? > > I found the following List Shares sample script: > ------------------ > strComputer = "public" > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > > Set colShares = objWMIService.ExecQuery("Select * from Win32_Share") > > For each objShare in colShares > Wscript.Echo "Allow Maximum: " & objShare.AllowMaximum > Wscript.Echo "Caption: " & objShare.Caption > Wscript.Echo "Maximum Allowed: " & objShare.MaximumAllowed > Wscript.Echo "Name: " & objShare.Name > Wscript.Echo "Path: " & objShare.Path > Wscript.Echo "Type: " & objShare.Type > Next > -------------------- > > This does exactly what I want/need for Windows hosted shares. However, > when > I use a CIFS name defined on the NAS (e.g. "public" in the above code), I > get > this error message: > > List_shares.vbs(2, 1) Microsoft VBScript runtime error: The remote server > machine does not exist or is unavailable: 'GetObject' > > How do I need to re-work this script to gather this non-Windows hosted NAS > info? example: "start - run - \\servername" will show the non-hidden shares on the given server, even, I think, if it is not running windows. /Al |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows Network Shares Painfully Slow | Vista General | |||
| Windows Explorer Freezes on certain network shares | Network & Sharing | |||
| Windows Vista, VPN - Network Shares & Outlook 2003 Connectivity is | Vista networking & sharing | |||
| Cannot see list of shares | Vista networking & sharing | |||
| Cant connect from Vista to Windows 2000 SP1 Server network shares | Vista General | |||