我正在使用 Powershell 5.1、winver 1803 运行一个简单的 cmdlet。
我在运行:
Rename-Computer -ComputerName $pc -NewName $newName -DomainCredential $cred -Restart
此命令是脚本的一部分。脚本中的所有内容都有效 - 这条线曾经有效,但由于某种原因它停止了。
异常(exception)是:
Fail to rename computer '$pc' to '$newName' due to the following exception: Not enough quota is available to process this command.
不存在内存或页面文件大小问题。甚至没有其他应用程序在运行。页面文件大小超过 8GB。
WinRM 正在运行,堆栈 3.0。
为什么这个命令会产生这个错误?我该如何解决它?
更新
这就是我所看到的......
Rename-Computer : Fail to rename computer 'W4000100' to 'W1401-TR100' due to the following exception: Not enough quota is available to process this command. At line:2 char:9 + Rename-Computer -ComputerName $pc -NewName $newName -DomainCr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (W4000100:String) [Rename-Computer], InvalidOperationException + FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommand Rename-Computer : Fail to rename computer 'W4000100' to 'W1401-TR100' due to the following exception: Not enough quota is available to process this command. At line:2 char:9 + Rename-Computer -ComputerName $pc -NewName $newName -DomainCr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (W4000100:String) [Rename-Computer], InvalidOperationException + FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommand
同样,如果您尝试通过 GUI 在本地重命名计算机,则会弹出相同的消息,并且如果我从名称中删除连字符等也会发生相同的消息。
最佳答案
经过研究,我相信这个解决方案可以从 Phil Coutard 的以下文章中解决您的问题:
http://blog.coultard.com/2012/01/fix-windows-error-0x80070718-not-enough.html
这可以在用户级别设置。尝试转到控制面板、同步中心、脱机文件、管理脱机文件(左侧)、磁盘使用选项卡、更改限制。可能是您的磁盘使用量有限制。先试试看能不能解决。
更新:
如果这不起作用,因为错误非常普遍,我建议使用 Microsoft 的自动诊断/修复工具:https://support.microsoft.com/en-us/help/17590/automatically-diagnose-and-repair-windows-file-and-folder-problems
关于Powershell 异常 : Not enough quota is available to process this command,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53674755/