PS script (check service status, wait for service to be stopped)
Hey Experts. I need to copy data from a directory on a server (serverA) but a Windows service on the server needs to be stopped before the data is copied. Not sure how to get the script to check for the Windows service (say spooler) to be stopped before the script continues on. Thank you in advance for any help!
PowershellWindows 10AzureWindows Server 2016
Last Comment
samiam41
8/22/2022 - Mon
samiam41
ASKER
*I'm running the script as a scheduled task on my PC so the commands would need to be remote (I'm guessing)
*I'm running the script as a scheduled task on my PC so the commands would need to be remote (I'm guessing)