首页 > 解决方案 > Powershell 配额

问题描述

我想将配额添加到特定用户文件夹(文件夹名称是用户名),所以我使用用户名($NomUtilisateur)创建了一个新文件夹,但是在我想使用 fileServerRessourceManager 添加配额之后。

我有这个错误:错误是: Set-FsrmQuota : 0x80045301, C:\Users\Administrateur.WIN-FIGS37ME7FE\desktop\Script.ps1:125 : 3 + Set-FsrmQuota -Path $path -Description "limit usage to 0.1 GB"-Si ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (MSFT_FSRMQuota:Root/Microsoft/.../MSFT _FSRMQuota) [Set-FsrmQuota], CimException + FullyQualifiedErrorId : HRESULT 0x80045301,Set-FsrmQuota –</p>

if (DossierUser($vrai=0)) {
  New-Item -Path "U:\LeProgramme\" -Name "$NomUtilisateur" -ItemType "directory"
  Set-FsrmQuota -Path "U:\LeProgramme\$NomUtilisateur" -Description "limit usage to 0.1 GB" -Size 0.1GB
}


else {
  New-Item -Path "V:\LeProgramme\" -Name "$NomUtilisateur" -ItemType "directory"
  Set-FsrmQuota -Path "V:\LeProgramme\$NomUtilisateur" -Description "limit usage to 0.1 GB" -Size 0.1GB
}

标签: windowspowershellquota

解决方案


推荐阅读