Forum Discussion
After installing KB5065426, access to remote host no longer works with "Invoke-Command -Session"
Hello, we have noticed that after installing the KB5065426 update, there are problems accessing a remote host via Invoke-Command and executing further code in Powershell.
Before installing the update, the following code worked to execute a script directly on the target host.
$session = New-PSSession -ComputerName $hostname -Credential $credentials
Invoke-Command -Session $session -ScriptBlock $patchScript
Once the update is installed, access breaks and you get the following error:
Connecting to remote server (hostname) failed with the following error message : Access is denied.
For more information, see the about_Remote_Troubleshooting Help topic.
CategoryInfo: OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
Is there any information available about this? Unfortunately, we currently had to uninstall the update so that existing access to the remote host via “Invoke-Command -Session $session” would work.
2 Replies
- MicRiCopper Contributor
So will it stay that way, or will the changes be reversed in a future update?
Unfortunately, we are having problems with this in our automation. What alternative is recommended if this is no longer possible?
- CharlesTurnerIron Contributor
The issue you're experiencing with Invoke-Command failing after installing KB5065426 is likely related to security or authentication changes introduced by this update. Such updates can sometimes modify Windows Defender, Windows Remote Management (WinRM), or related security policies, leading to "Access is denied" errors.