1

I would like to write a message to a client who is connected via a remoteSession. I would like to use the Powershell Snap-In View PowerCli.

Is there a possibility?

My main target is: When I send a session logOff my Client should be informed in form of a pop up message that he will loged off after 5minutes or something like that.

The best solution would be to send a message automatically if I Send a SessionLogOff via PowerCli. But I found out that doesn't work with the Version 4.6.

So I want to do that manually with my own script.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
andreaspfr
  • 2,298
  • 5
  • 42
  • 51
  • Is it about a "Remote session" to a machine like remote desktop connection (mstsc) ? How do you do it with 4.6 ? Paste your code please. – Leni Kirilov Nov 15 '12 at 10:29

1 Answers1

0

Something like

start-process "cmd.exe" "/c C:\msg.bat"

.bat contents would be

msg.exe /SERVER:fullcomputername theirusername HelloWorld

If you don't know the username you can use query session /server:fullcomputername and process the usernames you get back.

user3520245
  • 1,016
  • 1
  • 8
  • 18