start and stop service

Giancarlo Zuffi 0 Reputation points
2023-10-06T07:29:46.63+00:00

how to make a script to start and stop service

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,329 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 34,271 Reputation points Microsoft Vendor
    2023-10-09T03:51:24.4233333+00:00

    Hi,

    You can use start-service and stop-service cmdlets.

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-service

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/stop-service

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments