Rebooting an array of servers (append line per reboot)

CABraun 21 Reputation points
2021-01-27T17:30:12.483+00:00

Hello,

I have a small runbook that will be used to read an list of servers, CPU count, Memory (MB), shut down each VM on the list and update the CPU and RAM value then power each VM on.

I want to write to a log file as the RPC service is running on each to confirm that the server has been updated and restarted successfully.

Everything works great in the runbook other than that logging. Instead of writing to the log as each server's RPC service starts, it is waiting for all the servers RPC service to start and then writing in bulk to the log all of them.

What I want in the log (Each server reports what time its RPC service started):
ServerA - Old RAM 2048 - New RAM 4096 - Old CPU Count 2 - New CPU Count 4 - RPC Service Started 01/27/21 at 9:15:23AM
ServerB - Old RAM 1024 - New RAM 4096 - Old CPU Count 1 - New CPU Count 4 - RPC Service Started 01/27/21 at 9:16:01AM
ServerC - Old RAM 4096 - New RAM 4096 - Old CPU Count 2 - New CPU Count 8 - RPC Service Started 01/27/21 at 9:16:40AM

What I actually get in the log (Each server reports the time of the last server RPC service starting):
ServerA - Old RAM 2048 - New RAM 4096 - Old CPU Count 2 - New CPU Count 4 - RPC Service Started 01/27/21 at 9:16:40AM
ServerB - Old RAM 1024 - New RAM 4096 - Old CPU Count 1 - New CPU Count 4 - RPC Service Started 01/27/21 at 9:16:40AM
ServerC - Old RAM 4096 - New RAM 4096 - Old CPU Count 2 - New CPU Count 8 - RPC Service Started 01/27/21 at 9:16:40AM

How can I get the runbook to append a line to the log as each server's RPC service is successfully detected as running?

60988-image.png

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
217 questions
{count} votes

Accepted answer
  1. Andreas Baumgarten 98,626 Reputation points MVP
    2021-01-27T19:11:19.003+00:00

    Instead of the global variable you could use the Activity End Time of the Get Service Status activity. This would use the individual date/time information, when each individual Get Service Status activity finished.
    To get this activity specific data you need to check the option Show common Published Data when you subscribe to the published data.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful