![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | 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 Specs![]() |
![]() |
| 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 | |||