windows - Powershell启动需要很长时间
问题描述
这是一个奇怪的问题。我敢肯定这在两个月前工作得很好,现在突然就这样了。当我启动 powershell (直接从开始菜单或从 cmd。是否以管理员身份启动)时,我得到以下几行:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
然后它被冻结超过 30 秒,然后,我得到命令行和光标,我可以写
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\user>
我在互联网上进行了很多搜索,但所有使用某些命令的解决方法都没有帮助。最后,所有的讨论要么太老了,这可能是新的。知道会出什么问题吗?我没有安装任何只是 Windows 更新的东西(但更多,并且不确定它什么时候开始表现得像这样。我在 windows 10 pro 最新更新上
非常感谢马雷克的任何提示
解决方案
在使用 procmon(sysinternals 工具)分析 powershell.exe 之后,我可以看到该进程正试图在 catroot2 文件夹中执行某些操作,因此在重命名它之后(您必须停止阻止该文件夹的 CryptSvc 服务),它是自动创建的。所以结论是该文件夹已损坏。(对不起,我的英语不好)
执行下一个 .bat
net stop CryptSvc /y
rename c:\windows\system32\catroot2 Catroot2.bak
net start CryptSvc
推荐阅读
- html - 将边框应用于div时如何防止div元素移动?
- scala - AKKA `Http().singleRequest` 可能会卡在一个节点上
- java - 提交任务中的值始终相同 - ExecutorService
- javascript - TypeError:尝试删除条目时无法读取未定义的属性(读取“id”)
- c - 在C语言中,return之后的语句的目的是什么?
- php - Prestashop 使用 renderView() 和 renderList() 在列中显示图像
- ssis - SSIS:将数据从数据表对象加载到 SQL Server 数据库表
- list - 如何解决这个错误?'列表
' 不是类型 'List 的子类型 ' 'val'E/flutter (29035): #0 RxObjectMixin.value= - python - 使用 modin 和 Ray 将数据集写入多个目录会莫名其妙地停顿
- ios - 如何为饼图的每个切片设置特定颜色?