In release management there is a tool available to restart a service. This works fine as long as there is no other service depending on the service being restarted. If there is any dependant service this action throws an error.
Investigation in WWW revealed using a PowerShell to do this is not that easy. Few important links on this is here.
Each solution in above link had some sort of an issue. Some did not work if there is dependency in another dependant service. Some solution not have the correct order of stop start sequence. Some does not start only the services that were running earlier.
Out of above
the question (by Scott W. Sander) itself had a great code segment. A little bit of enhancement to that script made below powershell script which is perfectly working. Download from here https://gallery.technet.microsoft.com/PowerShell-Script-for-8243e5d1
To create a reusable Release Management tool setup as shown below.
A component using the tool can be created.
The component available for release template.
When used with Release template it manages to stop dependant services first and stop the requested service. Then restart the requested service and the dependant services.
SQL Server Integration Services (SSIS) projects can be created to perform ETL (Extract Transform and Load) operations. As Implementing of Co...
Generally windows services are deployed by creating an msi installer. It is possible to deploy msi via VSTS/TFS release management using the...
Task groups are really useful to share common actions with multiple build or release pipelines in Azure DevOps (VSTS). You can group multip...
GItHub has a easy way to get raw contents of a file by clicking on Raw button for any code file in GitHub, where it will redirect to url sta...
It is great if the latest updates to TFS can be applied as and when they are released. But for a large organization it might not be sometime...