Remoting sessions aren’t a “logon.” They’re a network authentication, just like accessing a shared folder, so they’re logged in the same way. Apart from any custom logging, which you could potentially implement as a startup script in a custom endpoint, there isn’t any other logging. WMF5 offers some new logging options, but yo don’t mention if that’s what you’re using so I don’t want to assume you are
And remoting sessions are never “interactive.” That isn’t how they work. Using Enter-PSSession is essentially the same as using New-PSSession and then repeated Invoke-Command commands. The typing is done in your local console (not like SSH), and when you hit enter it’s sent to the remote machine for execution.
Thanks for the response. I like the idea of a startup script with a custom endpoint. I’ll look into that.
With interactive I primarily meant that I can freely send commands to the remote system without having to use invoke-command with a pre-created session all the time. I know that remoting sessions don’t work like SSH because everything is just being deserialized before being sent to me from the remote system and displayed on my end.
My goal is really just to get a quick summary of the remote system when I use enter-pssession but I don’t want this “summary” to run during sessions that are created with new-pssession.
I’d be happy to know if there’s anything in PSv5 that would enable me to implement this since I’m eagerly waiting for the official WMF5 release
Problem being that the remote computer only “sees” one kind of session. It can’t tell the difference in how they were created. Sessions created with Invoke-Command, New-PSSession, and Enter-PSSession are all exactly the same.
Take a look at the session Jeff Hicks and Lee Holmes did at PowerShell Summit NA 2015. They’re at youtube.com/powershellorg in a playlist. They cover a lot of the new logging functionality.