8,330 questions
You'd have to be running your script using the credentials of the logged-on user for it to work.
This might help you: https://stackoverflow.com/questions/61971517/powershell-send-a-toast-notification-to-logged-user-when-running-as-local-syste