I am new to Python and I am trying to make a script that connects to a remote windows machine and execute commands there and test ports connectivity.
Here is the cod
For connection
c=wmi.WMI('machine name',user='username',password='password') #this connects to remote system. c is wmi object
for commands
process_id, return_value = c.Win32_Process.Create(CommandLine="cmd.exe /c ") #this will execute commands