Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Trying to list non-Windows NAS network shares

Reply
 
Old 09-08-2008   #1 (permalink)
DennyThury


 
 

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 SpecsSystem Spec
Old 09-08-2008   #2 (permalink)
Al Dunbar


 
 

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?
I have no idea, but do you have any manual ways of doing this that work? For
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 SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46