You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enter-PSSession - Clear-Host from non-Windows client to Windows target fails #28115
When targeting a Windows host from a non-Windows host through Enter-PSSession calling Clear-Host fails. The Clear-Host implementation on a Windows target runs the following script:
Calling this in a remote PSSession will send the host method call back to the client which is fine with Windows client but a non-Windows client SetBufferContents for UNIX throws a NotImplementedException. The CursorPosition does still work but the contents are not cleared.
Expected behavior
The console is cleared and the cursor set back to position `0, 0`.
Actual behavior
The cursor position is set back to `0, 0`, `The method or operation is not implemented.` is displayed and original content is not cleared.
Error details
No explicit error for `Get-Error` as the exception isn't sent back to the remote session and just printed on the screen.
> The method or operation is not implemented.
Environment data
All Powershell 7.x versions.
Visuals
The below example shows what happens on a Linux client connecting to Windows.
Screen.Recording.2026-09-28.at.8.58.26.pm.mov
The same error occurs regardless of the transport protocol used.
Prerequisites
Steps to reproduce
When targeting a Windows host from a non-Windows host through
Enter-PSSessioncallingClear-Hostfails. TheClear-Hostimplementation on a Windows target runs the following script:Calling this in a remote PSSession will send the host method call back to the client which is fine with Windows client but a non-Windows client SetBufferContents for
UNIXthrows aNotImplementedException. TheCursorPositiondoes still work but the contents are not cleared.Expected behavior
The console is cleared and the cursor set back to position `0, 0`.Actual behavior
The cursor position is set back to `0, 0`, `The method or operation is not implemented.` is displayed and original content is not cleared.Error details
Environment data
All Powershell 7.x versions.Visuals
The below example shows what happens on a Linux client connecting to Windows.
Screen.Recording.2026-09-28.at.8.58.26.pm.mov
The same error occurs regardless of the transport protocol used.