Importing extra clients / AD connection

Hi everyone,

is it posible somehow to import extra clients? I have 300 clients in different subnets and it would be great if we could import them from Active Directory…

I don’t know how to get the computernames from AD, but lets assume you managed that and now have a file “computernames.txt” with each computername in a line.

Using this wrapper you can then create the extra clients: https://urbackup.atlassian.net/wiki/display/US/Python3+web+api+wrapper

import urbackup_api

server = urbackup_api.urbackup_server("http://192.168.1.2:55414/x", "admin", "foo")

for extra_client in server.get_extra_clients():  
    server.remove_extra_client(extra_client["id"])

with open("computernames.txt", "r") as f:
    for line in f:
        server.add_extra_client(line)

Edit: Added delete previous to adding the computers. See here for how to get the computernames into a file: http://www.powershelladmin.com/wiki/Getting_computer_names_from_AD_using_Powershell

Great, thanks! Is it possible to remove extra clients on the same way? General idea is to create scheduled job that executes once a day to get computernames that are active in one .txt file to add them to extra clients, and to get disabled computers in another .txt file so urbackup server removes them from extra clients.