I'm trying to get returned powershell output into slack via errbot. The bot is functioning correctly, running the code correctly and the output is being displayed in shell as expected. Can I send that returned data to slack via python code as is or do I need to return an object to return? Below I expect var x to give me the returned data, but it's obviously not.
@botcmd
def find_vm(self, args, SearchString):
x = subprocess.call(["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", ". \"C:\\Program Files\\Toolbox\\PowerShell Modules\\vmware\\./vmware.psm1\";", "find-vm", SearchString])
return x