Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def connect():
  2. c = wmi.WMI()
  3. for d in c.Win32_LogicalDisk():
  4. print(d.Caption, d.FreeSpace, d.Size)
  5.  
  6. def connect_windows(ip):
  7. connection = wmi.WMI(ip, user = "username", password = "password")
  8. for info in connection.Win32_LogicalDisk():
  9. print(info.Caption, info.FreeSpace, info.Size)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement