您好,
我是脚本或者PowerShell的新手
Im newbie for scripting or powershell
案例背景
我们在// fileserver / sharepath /中创建了120个文件夹,所有这120个文件夹都是使用用户AD用户名的名称。
We have created 120 folder in //fileserver/sharepath/ and all this 120 folder been name using users AD username.
如何使用文件夹名称输入自动化每个文件夹的权限设置(完全控制)。
How can i automated the permission setting for each folder (full control), using the folder name input.
示例
user = John Smith和 AD用户名 jsmith
user = John Smith and theAD username jsmith
// fileserver / sharepath / jsmith
上述文件夹的权限设置应该是对管理员的完全控制权和 jsmith仅限
permission setting for above folder should befull control for the admin andjsmithaccount only
谢谢
推荐答案
这个控制台命令可以解决问题:
This console command will do the trick:
for / d%a in(*。*)do @icacls"%a" / T / grant"%a":F系统:F管理员:F
最好先在单个文件夹上测试命令:
Best to first test the command on a single folder:
icacls" jsmith" / T / grant" jsmith" ;:F系统:F管理员:F
更多推荐
根据文件夹名称输入设置权限
发布评论