Unable to Display pop-up from PowerShell - started by Task Scheduler.


  1. Posts : 2
    Win 7 64 Enterprise
       #1

    Unable to Display pop-up from PowerShell - started by Task Scheduler.


    I have a PowerShell script that is kicked off via Task Scheduler in the middle of the night when I'm not using the computer. One of the tasks in the script is to check if a remote network share is available and display a pop-up message if it is not. This is so I can see a visual reminder that the share was unavailable when I log on in the morning. When the PowerShell script is run from Task Scheduler it doesn't pop-up irregardless of whether I'm logged in or not. That kind of makes sense I guess since Task Scheduler is not expecting user interaction.

    How can I accomplish this remote share check and display a pop-up that is also scheduled via Task Scheduler? Or how can I get my PowerShell script to display this pop-up when run via Task Scheduler?

    Thanks,
    Gary
      My Computer


  2. Posts : 6,285
    Windows 10 Pro X64
       #2

    Maybe send yourself an E-mail instead?
      My Computer


  3. Posts : 2
    Win 7 64 Enterprise
    Thread Starter
       #3

    Ztruker said:
    Maybe send yourself an E-mail instead?
    PowerShell v2 has a cmdlet just for this and it works!
    Send-MailMessage -To "me@some_address.com" -From "me@some_address.com" -Body "test" -Subject "test!" -SmtpServer "mail.some_address.com"

    Thanks for your idea.

    Gary
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    I suspect the problem with the script popup is it's not running under your account but running under System. Just a guess.

    Glad E-mail works though.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:17.
Find Us