我们正在尝试在多个文件夹上设置配额,所有用户目录的限制为0.5gb(硬限制)
我以为如下简单,但一直说路径无效,不是:(
$shares = get-content c:\PSR\users.txt
foreach ($share in $shares)
{
New-FsrmQuota -Path "C:\test" -Description "limit usage to 0.5 GB" -Size 0.5GB
}
您没有正确传递从文本文件中获取的路径。
下面的代码可能会正常工作。
$shares = get-content c:\PSR\users.txt
foreach ($share in $shares)
{
New-FsrmQuota -Path $share -Description "limit usage to 0.5 GB" -Size 0.5GB
}
希望帮助。