Hey everyone! I'm working on a PowerShell script that I want to use for showing a message in a console window. The tricky part is that this script will be executed by a service running under the SYSTEM account, which means the PowerShell window doesn't show up when I run it. I really need it to run as a service for my project, but I'd love some help figuring out how to make that message pop up. Any ideas? Thanks!
3 Answers
Another option you could consider is setting up a scheduled task that triggers the message display when the user logs in. Running a service just to show a message might complicate things unnecessarily!
I feel like you might have the whole approach a bit off. If you’re trying to show a message to users, it might be better to configure a login script instead of handling it through a service. Services generally don’t interact well with user sessions, which complicates things.
You might want to check out 'serviceUI.exe'. It's a utility that allows interactive UIs for processes running in the SYSTEM context, but just be cautious since it poses security risks as well. Do a quick search for it, and you should find more info!

Exactly! A service runs in a different context, so it won't have access to user desktop elements unless you implement some complex workarounds. A login script or a scheduled task would be way simpler!