Skip to content

Instantly share code, notes, and snippets.

@c1982
Created February 28, 2011 09:37
Show Gist options
  • Save c1982/847137 to your computer and use it in GitHub Desktop.
Save c1982/847137 to your computer and use it in GitHub Desktop.
Add new user, disable, enable and remove Mikrotik user.
using Mikrotik.Api;
namespace Usage
{
class Program
{
static void Main(string[] args)
{
//TODO : Add new user, disable, enable and remove Mikrotik user.
var variable = new Users("192.168.2.8", "admin", "password")
.Add("guest", "gPasswd", "read", comment: "Guest Account")
.Disable("guest")
.Enable("guest")
.Remove("guest");
//TODO: Get Active User List
var activeUsers = variable.ActiveUsers();
//TODO: Get User List
var userList = variable.UserList();
}
}
}
@ipald1
Copy link

ipald1 commented Jun 22, 2017

in this way account is created thanks... How about if i want to create a backup file that will help me backup my mikrotik to a folder how do i do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment