在服务器核心,重新启动powershell后突然没有安装,我该怎么做重新安装?
我没有设置远程pipe理,所以我不能用它来重新安装它。
“powershell”不被识别为内部或外部命令,可操作程序或batch file。
使用部署映像服务和pipe理(DISM.exe)工具启用PowerShell:
dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShellRoot
…或者如果这还不够:
dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all
dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShellRoot dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all
说“是”重新启动。
powershell Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra Shutdown -r -t 0
在服务器2012 R2中使用Shutdown /r /t 0