将消息写入 RemoteSession VMWare
我想向通过远程会话连接的客户端写入一条消息。我想使用 Powershell 管理单元查看 PowerCli。
有可能吗?
我的主要目标是:当我发送会话注销时,应该以弹出消息的形式通知我的客户,他将在 5 分钟后注销或类似的消息。
最好的解决方案是如果我通过 PowerCli 发送 SessionLogOff,则自动发送消息。但我发现4.6版本不支持这个功能。
所以我想用我自己的脚本手动执行此操作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像
start-process "cmd.exe" "/c C:\msg.bat"
.bat 内容将是
msg.exe /SERVER:fullcomputername yourusername HelloWorld
如果您不知道用户名,您可以使用查询会话 /server: fullcomputername 并处理您返回的用户名。
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.