0

I made a New-WPFMessageBox message with a model function, how can I take the final command (which is in the last line):

New-WPFMessageBox -Content $StackPanel -Title "Commit ID:$(build.sourceversion) " -TitleBackground LightSeaGreen -TitleTextForeground Black -ContentBackground LightSeaGreen

and forward it to all users of the server

Another idea: is to run a simple command in powershell in every session of a connected user:

powerShell -sta -file 'E:\Script-Popup\Popup-Message - Done.ps1'

full script: https://pastebin.com/raw/HzqGEfLU

vfdsabvdasvd
  • 35
  • 1
  • 6
  • perhaps a task schedule? – Abraham Zinala Nov 23 '22 at 19:58
  • is trigger by release in azure devops – vfdsabvdasvd Nov 23 '22 at 19:59
  • I am really not sure what you are after here. Where is the dialog being presented? As noted you can write code to create a Scheduled task on remote user systems to first as a particular time. Depending on what OS you are on, ```msg.exe``` can send a message to users. Popping a custom GUI/Form via PSRemoting is a bit of a challenge since PS and GUIs only run in the logged-on user context. [See this Q&A for other ideas](https://stackoverflow.com/questions/61971517/powershell-send-a-toast-notification-to-logged-user-when-running-as-local-syste). – postanote Nov 24 '22 at 06:44

0 Answers0