Aug-03-2021, 10:14 PM
Well, I was looking for an example for a few days and just found it.
Plugged it in ad it works!
here is the whole snipped if anyone is interested:
I think this is the best place to learn Python.
Plugged it in ad it works!
here is the whole snipped if anyone is interested:
import wmi from socket import * ip = '101.17.48.11' username = 'Some_user' password = 'somepassword' proc=open('c:\\somedir','w') try: print("Establishing connection to %s" %ip) connection = wmi.WMI(ip, user=username, password=password) connection = wmi.WMI(ip) print("Connection established") for process in connection.Win32_Process(): #print("ID: {0}\nProcessName: {1}\n".format(process.ProcessId,process.Name)) print(f"Proccess-ID/Nmae -> {process.ProcessId} - {process.Name} ") proc.write(str(process.ProcessId)+","+process.Name+"\n") except wmi.x_wmi: print("Your Username and Password of "+getfqdn(ip)+" are wrong.") proc.close()Thank you everyone for the support and coaching!
I think this is the best place to learn Python.