Created
February 28, 2011 09:37
-
-
Save c1982/847137 to your computer and use it in GitHub Desktop.
Add new user, disable, enable and remove Mikrotik user.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?