windows - 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
}
解决方案
推荐阅读
- excel - 如何检测用户是否单击文件>>打印作为选项或使用 VBA 代码从 MS Word 或 Excel 中按 CTRL+P?
- spring-cloud-dataflow - scdf是如何实现多输出功能的?
- html - 为什么文件上传成功后我的网站没有更新?(FTP)
- flutter - 对如何解决 fl graphs 和 provider 感到困惑
- reactjs - 无法将外部 babel 插件添加到 react-app-rewired
- python-3.x - 如何修改PIL.Image中调色板和颜色的对应关系
- java - 如何理解 Java 中 BST 的递归中序遍历?
- sql - SQL Server 自动标识意外重置/值
- javascript - 将数字时间戳值转换为 `MMM YYYY` 格式
- postgresql - 在 postgres 中插入触发器后不起作用