locked
Use PS to start and stop a process depending upon the starting and stopping of another process RRS feed

  • Question

  • I was trying to use Task Scheduler to start Skype for Business after Outlook had started (already using it to start Outlook), and to kill SfB after Outlook was terminated. Apparently, that's beyond TS's capabilities; it was suggested I look here for help on scripting this operation. The PS scripts to start and stop Skype were simple enough; but finding how to trigger them is a galactic hemorrhoid. I would appreciate any assistance on automating this process — perhaps more accurately, these processes.

    Many thanks.

    Apologies for the small type. It happened when I moved the parenthetic gloss; there seems to be no way to correct that.
    • Edited by K Mc Friday, August 24, 2018 4:44 PM
    • Moved by jrv Thursday, August 30, 2018 5:59 PM Correct forum
    Friday, August 24, 2018 4:42 PM

All replies

  • Skype can start automatically by just setting the settings to start skype.

    Skype and Outlook cannot run when no user is logged in.  Neither are designed to be run under the task scheduler or as a service.  See MS documentation for this.

    This is not a task scheduler forum.

    Please carefully review the following links to set your expectation for posting in  technical forums.

    This Forum is for Scripting Questions Rather than script requests


    \_(ツ)_/

    Friday, August 24, 2018 4:52 PM
  • I am aware this is not a TS forum. I stated in the OP that the operation I was trying to perform is beyond TS's capabilities; therefore, it was suggested I seek help from the PS community. It was suggested that PS could be used to script the automatic loading of these programs. I am trying to keep Skype from loading before Outlook. If I let Skype run its own game, it will frequently load first. Undesired outcome.
    Thursday, August 30, 2018 5:48 PM
  • Your issue has nothing to do with scripting.  It is about configuration of components. 

    I can suggest posting in the Skype forum for assistance with your issue.  It is likely you have a configuration issue or may need a patch.


    \_(ツ)_/

    Thursday, August 30, 2018 5:58 PM
  • I am aware this is not a TS forum. I stated in the OP that the operation I was trying to perform is beyond TS's capabilities; therefore, it was suggested I seek help from the PS community. It was suggested that PS could be used to script the automatic loading of these programs. I am trying to keep Skype from loading before Outlook. If I let Skype run its own game, it will frequently load first. Undesired outcome.

    Why not just run Powershell as a scheduled task and use it to check the condition of the tasks? If Outlook isn't running and Skype is, stop Skype. Then start Outlook, wait for it to start, and then start Skype.

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    Thursday, August 30, 2018 5:59 PM
  • My point is that, if correctly configured, it shouldn't matter.  They are partner applications in Office. They work interactively and should not have issues.  A call to MS Support for Office would likely find the solution quickly.

    I moved this to the Skype forum in the hopes that someone here would have experience with this.  The OP should post the exact failure being experienced.


    \_(ツ)_/

    Thursday, August 30, 2018 6:28 PM
  • Hi ,

    First of all, I not famialr with task sheduler, I just could give your some details about SFB.

    Based on your issue, I think you could disable the SFB auto start, if Outlook is running, then start the SFB.

    If no user sign in SFB, SFB just could run in the backgroud, some festure will be attected,such as you can not schduel Skype meeting in Outlook, and you cannot see the presence of SFB.


    Best Regards,
    Leon Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, August 31, 2018 10:19 AM
  • SfB autostart has been disabled. (In fact, it was only a few minutes ago I realized I hadn't fired it up today; and the workday is almost done.) The question is how to test for Outlook running before SfB starts and, on the other end, test for Outlook no longer running and terminate SfB.
    Friday, August 31, 2018 7:32 PM
  • Get-Process Outlook, lync

    If you need to use PwoerShell you will need to first learn PowerShell.

    Generally we do not "hack" solutions. The Best Practice is to repair things and not hack them.


    \_(ツ)_/


    Friday, August 31, 2018 7:39 PM