Remote Powershell Popup message to all users not working

后端 未结 1 500
深忆病人
深忆病人 2021-01-26 16:04

I\'m having some issues creating a remote powershell popup message.

I\'ve got a working script that displays the popup message that I want to send to a remote user. How

相关标签:
1条回答
  • 2021-01-26 16:27

    Your hunch is correct. The PowerShell script is running in the context of the service account, and won't show up for any of the logged in users. (for ex. if your script launched notepad.exe, it would run only for the service account).

    You will see it pop up when you run the command locally under the same account.

    @Adrian R is correct you can use msg.exe to send a message, or the more commandline friendly:

    net send /users message
    

    If you want to show something more complex (i.e. a full-on Windows form) instead of the classic message box, then you need to be running something in the user context. One way to do this is to use PsExec with the -i (interactive option) instead of using PowerShell remoting.

    0 讨论(0)
提交回复
热议问题