远程连接windows系统 https://blog.51cto.com/ckl893/2145809
import winrm
win2008 = winrm.Session('http://10.116.0.248:5985/wsman',auth=('administrator','smc@0s248'))
r = win2008.run_cmd('ipconfig')
print (r.std_out.decode())
print (r.std_err)
2023-12-02 07:57:15
远程连接windows系统 https://blog.51cto.com/ckl893/2145809
import winrm
win2008 = winrm.Session('http://10.116.0.248:5985/wsman',auth=('administrator','smc@0s248'))
r = win2008.run_cmd('ipconfig')
print (r.std_out.decode())
print (r.std_err)