枚举 Windows 网络共享及其上或内部的所有自定义权限
我们有各种服务器,其中有许多共享目录。 查看共享浏览器以查看“顶级”共享是什么很容易,但下面是一堆杂乱的自定义权限,没有任何记录。
我想枚举域上的所有共享(当然是所有“服务器”,本地 PC 就很好),然后递归每个共享并报告与父级的任何偏差。 如果孩子有相同的权限,则无需报告。
与编写大型 C# 应用程序相比,我更喜欢简单的脚本解决方案,但任何有效的方法都可以(甚至现有软件)。
例如,我想得到:
SERVER1\
\-- C: (EVERYONE: Total control, ADMINs, etc. etc.)
\-- (skip anything that is not the same as above)
\-- SuperSecretStuff (Everyone: NO access; Bob: Read access)
SERVER2\
\-- Stuff (some people)
等等。
We have various servers that have many directories shared. It's easy enough to look at the share browser to see what the "top level" shares are, but underneath is a jumbled mess of custom permissions, none of which is documented.
I'd like to enumerate all the shares on the domain (definitely all the 'servers', local PCs would be nice) and then recurse down each one and report any deviation from the parent. If the child has the same permissions, no need to report that back.
I'd prefer a simple script-y solution to writing a big C# app, but any method that works will do (even existing software).
For example, I'd like to get:
SERVER1\
\-- C: (EVERYONE: Total control, ADMINs, etc. etc.)
\-- (skip anything that is not the same as above)
\-- SuperSecretStuff (Everyone: NO access; Bob: Read access)
SERVER2\
\-- Stuff (some people)
etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这不是脚本,但是你尝试过 ShareEnum 吗? http://technet.microsoft.com/en-us/sysinternals/bb897442。 aspx 然后导出出来? 您还可以与较早的运行进行比较。 我不认为有命令行界面(这很糟糕),但它会为您提供所需的信息
I know it isnt scripting, but have you tried ShareEnum? http://technet.microsoft.com/en-us/sysinternals/bb897442.aspx and then export it out? You can also compare to older runs. I don't think there is a cmd line interface (which sucks), but it will get you the info you need
此 Powershell 脚本可实现您的目标。
正如它所说:
This Powershell script accomplishes your goal.
As it is stated: