Execute Powershell Commands via Python

You can use below script to execute Powershell commands,

Note: This script will provide you list of windows logs via Powershell.

import subprocess;
process=subprocess.Popen(["powershell","Get-Childitem C:\\Windows\\*.log"],stdout=subprocess.PIPE);
result=process.communicate()[0]
print (result)

Sample output would be,

hi,
can some one explain how can i use this script ? where can i put the powershel script ?

Hello @cfcsupport ,

Please take a few to browse through https://help.comodo.com/topic-399-1-786-10976-Create-a-Custom-Procedure.html
This should help you better understand how Procedures work/are managed.