7 Replies Latest reply on Nov 25, 2019 7:36 AM by Igor Mihevc

    PowerShell command output need to write in CSV file and based on condition send mail to required recipients.

    Amit Agarwal
      Share This:

      Hello All,


      I am new user in AO, and want to design a WO.


      Flow Design,

           Read CSV File [ Application Name, Server Name, Service Name] – Part Done

           Check Service Status using PowerShell Adapator, - Part Done

           Write back to another new CSV file [ Application Name, Server Name, Service Name Status] – Unable to perform,

         Based on Status Result, need to send mail to require recipients [ Like Stopped as Critical Mail,and Running as Healthy] - Unable to perform.



      Here is my Power-Shell Adapator output response,



                  <command>Get-Service "BladeApp Server" | select DisplayName,Name,Status | ConvertTo-Csv</command>







                  <line index="1">Copyright 2010 BMC Software Ltd, Version: 1.6.2  </line>

                  <line index="2">Connecting to remote service...</line>

                  <line index="3">Connected to remote host.</line>

                  <line index="4">Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed.</line>

                  <line index="5">#TYPE Selected.System.ServiceProcess.ServiceController</line>

                  <line index="6">"DisplayName","Name","Status"</line>

                  <line index="7">"BladeLogic Application Server","BladeApp Server","Running"</line>

                  <line index="8">Remote application exited with code: 0 </line>