Need to execute linux command using SAM template

Hi Team,

Is there any way that we can check if the servers lost from the domain using SAM template
i have the linux commands to check manually.
i want to check this using sam template so that i can create alerts and enable monitoring.

~ # net ads info