Answer the question
In order to leave comments, you need to log in
How to delete files on a remote PC?
Good evening.
There was a question about deleting files on a remote PC (local network).
The connection is implemented like this:
def connect(server):
ip = server
username = "здесь логин"
password = "здесь пароль"
try:
print "Establishing connection to %s" %ip
connection = wmi.WMI(ip, user=username, password=password)
print "Connection established"
except wmi.x_wmi:
print "Your Username and Password of "+getfqdn(ip)+" are wrong."
Answer the question
In order to leave comments, you need to log in
Judging by this script, it creates a wmi object, what to do with it is up to you, at least delete the files, at least format the disk. Which operations it supports initially can be viewed here , but which of them your object supports you need to look at its source code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question