Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 在多台服务器上安装KB修补程序_Windows_Powershell - Fatal编程技术网

Windows 在多台服务器上安装KB修补程序

Windows 在多台服务器上安装KB修补程序,windows,powershell,Windows,Powershell,我试图在多台服务器上安装KB修补程序,但在执行时收到下面的错误消息。有人能帮我吗 仅供参考:系统上已启用PSRemoting 代码: $SB={ Start-Process -FilePath 'wusa.exe' -ArgumentList "C:\Program Files (x86)\McAfee\Win7AndW2K8R2-KB3134760-x64.msu /quiet /norestart" -Wait -PassThru } Invoke-Command -ComputerNa

我试图在多台服务器上安装KB修补程序,但在执行时收到下面的错误消息。有人能帮我吗

仅供参考:系统上已启用PSRemoting

代码:

$SB={ Start-Process -FilePath 'wusa.exe' -ArgumentList "C:\Program Files (x86)\McAfee\Win7AndW2K8R2-KB3134760-x64.msu /quiet /norestart" -Wait -PassThru }


Invoke-Command -ComputerName computer -ScriptBlock $SB
错误:

[computer] Connecting to remote server computer failed with the following error message : WinRM cannot process the
request. The following error occurred while using Kerberos authentication: Cannot find the computer computer. Verify
that the computer exists on the network and that the name provided is spelled correctly. For more information, see the
about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (computer:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionStateBroken
[computer] Connecting to remote server computer failed with the following error message : WinRM cannot process the
request. The following error occurred while using Kerberos authentication: Cannot find the computer computer. Verify
that the computer exists on the network and that the name provided is spelled correctly. For more information, see the
about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (computer:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionStateBroken

看起来您正在尝试在工作组计算机上运行脚本,如果我说的对,那么在工作组计算机上运行脚本时,在运行脚本之前,必须在每个服务器上设置以下命令

Enable-PSRemoting -Force
Set-Item wsman:\localhost\client\trustedhosts *
Restart-Service WinRM
Test-WsMan <server name>
启用PSRemoting-强制
设置项目wsman:\localhost\client\trustedhosts*
重新启动服务WinRM
测试WsMan

目标计算机是否与发送请求的计算机位于同一域中?如果没有,则不能使用Kerberos身份验证。您应该查看错误建议的帮助主题,并确保所有设置都正常(仅启用远程处理并不总是足够)。该服务器是域的一部分吗?服务器位于同一域中。但我仍然面临着这个问题。