文件服务之powershell应用

#建立共享(需要用到cmd)net share department=d:\department /grant:everyone,fullnet share common=d:\common /grant:everyone,fullnet share temp=d:\temp /grant:everyone,full#设置权限##设置Temp权限icacls D:\temp /inheritance:r /grant:r administrators:(oi)(ci)(f) “creator owner”:(oi)(ci)(f) “domain users”:(oi)(ci)(rx,m)##设置Common权限icacls D:\common /inheritance:r /grant:r administrators:(oi)(ci)(f) “creator owner”:(oi)(ci)(f) “domain users”:(rx)import-csv C:\group.csv | % { $name = $_.name icacls D:\common\$name /inheritance:r /grant:r administrators:f “”$name”:f”}##设置Department权限icacls D:\department /inheritance:r /grant:r administrators:(oi)(ci)(f) “creator owner”:(oi)(ci)(f) “domain users”:(rx)icacls D:\department\* /inheritance:r /grant:r administrators:(oi)(ci)(f) “creator owner”:(oi)(ci)(f) “domain users”:(rx)import-csv C:\hr.csv | % { $name = $_.name icacls D:\department\hr\$name /inheritance:r /grant:r administrators:f “”$name”:f”}import-csv C:\mis.csv | % { $name = $_.name icacls D:\department\mis\$name /inheritance:r /grant:r administrators:f “”$name”:f”}

本文出自 “IT—-你—我—他—” 博客,,转载请与作者联系!

经验是由痛苦中粹取出来的

文件服务之powershell应用

相关文章:

你感兴趣的文章:

标签云: