Keep service running with DSC on Windows Server

If you are in the need for keeping a service running or if you have a service that doesn’t start when you reboot your server, DSC in Azure Automation could be the thing for you!

In this post I will show how easy it is to create a DSC configuration that you can import, compile and then use on your servers. This off course works well both in on-premises datacenters as well as in Azure or any other public cloud provider.

Edit the following code and change the service you want to have started and save it to a PowerShell ps1-file (Example: MyDSC.ps1).

Create an Azure Automation Account and click on it.

Click DSC Configuration and then Add a configuration up to the left of the portal. Import the file created.

Keep service running with DSC on Windows Server 1

Click on the DSC Configuration in the portal and then Compile. When the compile is Completed you can start to use the configuration.

Keep service running with DSC on Windows Server 3

Click DSC Nodes and add the server you want to use DSC on.

Keep service running with DSC on Windows Server 2

Select if you want to deploy the configuration on an Azure VM och on-prem VM.

Keep service running with DSC on Windows Server 4

0

Send data to OMS Log Analytics with Java code

Here is an example how to send data to OMS Log Analytics directly from your Java code. To get more information how to change the variables and how to see the data in OMS please see the blog post where I do the same in bash and curl – blog post: Send data to OMS Log Analytics with Curl from a Linux server.

 

 

1