hi guys,can some one explain how exactly enter-pssession work ?
i think this type of remote connection work only for PS command not all command type.
i have install command line text editor “VIM” on my server 2022, but when i try to edit a text file i recived this error :
192.168.254.128]: PS C:\Users\Administrator\Documents> vim C:\programdata\ssh\sshd_config
vim : Vim: Warning: Output is not to a terminal
+ CategoryInfo : NotSpecified: (Vim: Warning: O...t to a terminal:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Vim: Warning: Input is not from a terminal
I actually wouldn’t expect VIM to work over a PSRemoting connection since it is not a classical command line tool. It handles it’s own input and output.
A PSSession is not a replacement for an SSH tunnel.
I’d say “No”.
What is it actually what you’re trying to accomplish? There might be another/ a better way.
If you want to use it, use a different software. If on Windows there’s a ton of options, also VS Code is always a great option with the poweshell extension. I can’t speak to other OS’s though.