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 - Re: Searching Network Share Permissions

Reply
 
Old 05-29-2009   #1 (permalink)
Guru


 
 

Re: Searching Network Share Permissions

Guru

I want to find & filter only those network shares with "Everyone" "Full
Control" Access rights on LAN.
Is there any way by which the output can be stored in some text file or Excel.

Thanks
Guru


"Pegasus (MVP)" wrote:
Quote:

>
> "Blosjos" <Blosjos@xxxxxx> wrote in message
> news:5BE77421-15CF-4FD3-8E66-3632A346F316@xxxxxx
Quote:

> > Thank you very much for your quick answer! :-) Would it be possible also
> > to
> > show the share permission along with everyone or authenticated users. Eg:
> > \\server1\share: Everyone Full Control
> > \\server2\share2: Everyone Modify
> > \\server3\share3: Everyone Read
> >
> > Thank you very much!
> >
>
> Try this:
> 01. const PCList = "c:\temp\PCs.txt"
> 02. Const Group1 = "EVERYONE" 'Must be upper case!
> 03. Const Group2 = "AUTHENTICATED USERS"
> 04.
> 05. Set objWshShell = CreateObject("WScript.Shell")
> 06. Set objFSO = CreateObject("Scripting.FileSystemObject")
> 07. Set objFile = objFSO.OpenTextFile(PCList)
> 08. While Not objFile.AtEndOfStream
> 09. CheckShares objFile.ReadLine
> 10. Wend
> 11. objFile.Close
> 12.
> 13. Sub CheckShares(strComputer)
> 14. Set ObjExec = objWshShell.Exec("srvcheck.exe \\" & strComputer)
> 15.
> 16. Do While Not ObjExec.StdOut.AtEndOfStream
> 17. Line = UCase(ObjExec.StdOut.ReadLine)
> 18. If InStr(Line, "BAD COMPUTERNAME") > 0 Then
> 19. WScript.echo strComputer & " is unreachable"
> 20. Exit Sub
> 21. End If
> 22.
> 23. If Trim(Line) <> "" Then
> 24. If Left(Line, 2) = "\\" Then
> 25. Name = Line
> 26. Else
> 27. If InStr(line, Group1) > 0 Then WScript.Echo "Share=" & Name & ": "
> & Line
> 28. If InStr(line, Group2) > 0 Then WScript.Echo "Share=" & Name & ": "
> & Line
> 29. End If
> 30. End If
> 31. Loop
> 32. End Sub
>
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Share Permissions For Folders General Discussion
Setting share permissions from PowerShell? PowerShell
user permissions from local computer to network share Vista account administration
Vista (Home Prem) Permissions - Multiple Access to a Network Share Vista networking & sharing
get permissions from share via wmi possible PowerShell


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